Skip to content

Commit

Permalink
release 1.8.3
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Scherf <f.scherf@pengutronix.de>
  • Loading branch information
fscherf committed Nov 24, 2021
1 parent 61d8591 commit 5e38820
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 19 deletions.
34 changes: 34 additions & 0 deletions doc/content/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
44 changes: 27 additions & 17 deletions doc/content/end-user-documentation/lona-scripts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,36 +45,42 @@ 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 </end-user-documentation/debugging.html#lona-server-command-line-options>`_,
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 <br> 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 <br> More Information: <a href="#lona-shell">Lona Shell</a>
|-o |Set setting to value before settings.py got loaded <br> example "-o MY_FEATURE=True"
|-O |Set setting to value after settings.py got loaded <br> 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 <br> 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 <br> More Information: <a href="#lona-shell">Lona Shell</a>
|-o |Set setting to value before settings.py got loaded <br> example "-o MY_FEATURE=True"
|-O |Set setting to value after settings.py got loaded <br> example "-o MY_FEATURE=True"

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 <br> To include a logger use "+{LOGGER_NAME}", <br> 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<br>More information: <a href="/end-user-documentation/debugging.html#lona-shell">Lona Shell</a>
^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 <br> To include a logger use "+{LOGGER_NAME}", <br> 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<br>More information: <a href="/end-user-documentation/debugging.html#lona-shell">Lona Shell</a>

Settings
Expand Down Expand Up @@ -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``.

Expand Down
6 changes: 5 additions & 1 deletion doc/content/end-user-documentation/views.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 </end-user-documentation/error-views.html>`_
Expand Down
2 changes: 1 addition & 1 deletion lona/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@

pass

VERSION = (1, 8, 2)
VERSION = (1, 8, 3)
VERSION_STRING = '.'.join(str(i) for i in VERSION)

0 comments on commit 5e38820

Please sign in to comment.