Add most of the structure! plus several Base Layer docs

This commit is contained in:
Lance Edgar 2021-01-07 16:48:14 -06:00
parent 3704b59b8d
commit 98d6961370
48 changed files with 1076 additions and 8 deletions

View file

@ -0,0 +1,32 @@
.. highlight:: ini
Configuring Logging
===================
Rattail relies on Python standard ``logging`` module to configure logging.
However if :doc:`inheritance` is involved then Rattail will first combine all
applicable config files into a single file before handing that off to
`logging.config.fileConfig()`_.
.. _logging.config.fileConfig(): https://docs.python.org/3/library/logging.config.html#logging.config.fileConfig
Rattail does not do any of this though, unless config says to. So if you want
it to configure logging in this way, specify this in your config file::
[rattail.config]
configure_logging = true
Beyond that you must ensure your config file(s) contains appropriate settings
for logging. Rattail `has a sample`_ ``rattail.conf`` which includes a typical
logging section. (This is the source used to generate a new file when you run
``rattail make-config -T rattail`` command.)
.. _has a sample: https://kallithea.rattailproject.org/rattail-project/rattail/files/master/rattail/data/config/rattail.conf
See the Python docs for more info, in particular these sections:
* `Configuration file format <https://docs.python.org/3/library/logging.config.html#logging-config-fileformat>`_
* `Logging Levels <https://docs.python.org/3/howto/logging.html#logging-levels>`_
* `Useful Handlers <https://docs.python.org/3/howto/logging.html#useful-handlers>`_
* `Formatters <https://docs.python.org/3/howto/logging.html#formatters>`_