diff --git a/doc/content/changelog.rst b/doc/content/changelog.rst index dc71a3d7..a489b9d0 100644 --- a/doc/content/changelog.rst +++ b/doc/content/changelog.rst @@ -5,6 +5,40 @@ search_index_weight: -10 Changelog ========= +.. changelog-header:: 1.8.3 (2021-11-24) + + +Changes +~~~~~~~ + +* Shell Commands + + * ``logging syslog priorities`` was added to ``%lona_info`` + +* Logging + + * Command line option ``--syslog-priorities=no|always|auto`` was added + +* Error Views + + * ``lona.NotFoundError`` was added + * ``lona.LonaApp.error_403_view`` was added + * ``lona.LonaApp.error_404_view`` was added + * ``lona.LonaApp.error_500_view`` was added + + +Bugfixes +~~~~~~~~ + +* Logging + + * Check if running in a systemd unit was fixed + + * On modern Linux desktop systems the desktop environment is often started + within a systemd unit. In these setups ``JOURNAL_STREAM`` is often set in + every shell. Therefore this check often yielded false positive results. + + .. changelog-header:: 1.8.2 (2021-11-22) diff --git a/doc/content/end-user-documentation/lona-scripts.rst b/doc/content/end-user-documentation/lona-scripts.rst index 2a00629d..542e80b9 100644 --- a/doc/content/end-user-documentation/lona-scripts.rst +++ b/doc/content/end-user-documentation/lona-scripts.rst @@ -45,20 +45,25 @@ python script. Command Line Arguments ---------------------- +.. note:: + + ``--syslog-priorities`` and ``syslog_priorities`` were added in 1.8.3 + ``LonaApp.run()`` supports command line arguments, like `Lona Server `_, to make calls like ``python your-script.py --port=8081`` work. .. table:: - ^Option ^Description - |-l / --log-level |Set log level to [debug,info,warn,error,critical] - |--loggers |Enable or disable a given list of loggers
To include a logger use "+{LOGGER_NAME}", to exclude "_{LOGGER_NAME}" - |--debug-mode |Enable debug log for {messages,views,input-events,view-events} - |--shell |Embed a shell in the same process as the server - |--shell-server |Starts rlpython shell server containing a Lona shell
More Information: Lona Shell - |-o |Set setting to value before settings.py got loaded
example "-o MY_FEATURE=True" - |-O |Set setting to value after settings.py got loaded
example "-o MY_FEATURE=True" + ^Option ^Description + |-l / --log-level |Set log level to [debug,info,warn,error,critical] + |--loggers |Enable or disable a given list of loggers
To include a logger use "+{LOGGER_NAME}", to exclude "_{LOGGER_NAME}" + |--debug-mode |Enable debug log for {messages,views,input-events,view-events} + |--syslog-priorities |Adds syslog priorities to log [no,auto,always] (auto is default) + |--shell |Embed a shell in the same process as the server + |--shell-server |Starts rlpython shell server containing a Lona shell
More Information: Lona Shell + |-o |Set setting to value before settings.py got loaded
example "-o MY_FEATURE=True" + |-O |Set setting to value after settings.py got loaded
example "-o MY_FEATURE=True" LonaApp.run\(\) Arguments @@ -66,15 +71,16 @@ LonaApp.run\(\) Arguments .. table:: - ^Name ^Default ^Description - |host |'localhost' |(Str) Host to bind against - |port |8080 |(Int) Port to bind against - |log_level |'info' |(Str) Set log level to [debug,info,warn,error,critical] - |loggers |[] |(List) Enable or disable a given list of loggers
To include a logger use "+{LOGGER_NAME}",
to exclude "_{LOGGER_NAME}" - |debug_mode |'' |(Str) Enable debug log for {messages,views,input-events} - |shutdown_timeout |0 |(Int) aiohttp server shutdown timeout - |shell |False |(Bool) Embed a shell in the same process as the server - |shell_server_url |'' |(Str) Lona Shell Server URL
More information: Lona Shell + ^Name ^Default ^Description + |host |'localhost' |(Str) Host to bind against + |port |8080 |(Int) Port to bind against + |log_level |'info' |(Str) Set log level to [debug,info,warn,error,critical] + |loggers |[] |(List) Enable or disable a given list of loggers
To include a logger use "+{LOGGER_NAME}",
to exclude "_{LOGGER_NAME}" + |debug_mode |'' |(Str) Enable debug log for {messages,views,input-events} + |syslog_priorities |'auto' |(Str) Adds syslog priorities to log [no,auto,always] + |shutdown_timeout |0 |(Int) aiohttp server shutdown timeout + |shell |False |(Bool) Embed a shell in the same process as the server + |shell_server_url |'' |(Str) Lona Shell Server URL
More information: Lona Shell Settings @@ -228,6 +234,10 @@ overridden. Custom Error Views ------------------ +.. note:: + + Added in 1.8.3 + Custom error views can be set using the decorators ``LonaApp.error_403_view``, ``LonaApp.error_404_view`` and ``LonaApp.error_500_view``. diff --git a/doc/content/end-user-documentation/views.rst b/doc/content/end-user-documentation/views.rst index 035986d4..a297e3d2 100644 --- a/doc/content/end-user-documentation/views.rst +++ b/doc/content/end-user-documentation/views.rst @@ -557,8 +557,12 @@ To raise a forbidden error and run the 403 view you can raise NotFoundError ------------- +.. note:: + + Added in 1.8.3 + To raise a not found error and run the 404 view you can raise -``lona.errors.NotFoundError``. +``lona.NotFoundError``. **More information:** `Error views `_ diff --git a/lona/__init__.py b/lona/__init__.py index 9e5f61c7..05156c22 100644 --- a/lona/__init__.py +++ b/lona/__init__.py @@ -10,5 +10,5 @@ pass -VERSION = (1, 8, 2) +VERSION = (1, 8, 3) VERSION_STRING = '.'.join(str(i) for i in VERSION)