Document "logformat" option for i3pystatus.status.Status()
This commit is contained in:
parent
3d97ea80b8
commit
16b28ec493
@ -248,6 +248,26 @@ files containing errors.
|
|||||||
|
|
||||||
status = Status(logfile='/home/username/var/i3pystatus.log')
|
status = Status(logfile='/home/username/var/i3pystatus.log')
|
||||||
|
|
||||||
|
Changing log format
|
||||||
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. versionadded:: 3.35
|
||||||
|
|
||||||
|
The ``logformat`` option can be useed to change the format of the log files,
|
||||||
|
using `LogRecord attributes`__.
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
from i3pystatus import Status
|
||||||
|
|
||||||
|
status = Status(
|
||||||
|
logfile='/home/username/var/i3pystatus.log',
|
||||||
|
logformat='%(asctime)s %(levelname)s:',
|
||||||
|
)
|
||||||
|
|
||||||
|
.. __: https://docs.python.org/3/library/logging.html#logrecord-attributes
|
||||||
|
|
||||||
|
|
||||||
Log level
|
Log level
|
||||||
~~~~~~~~~
|
~~~~~~~~~
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user