Mercurial > p > roundup > code
comparison doc/upgrading.txt @ 8423:94eed885e958
feat: add support for using dictConfig to configure logging.
Basic logging config (one level and one output file non-rotating) was
always possible from config.ini. However the LOGGING_CONFIG setting
could be used to load an ini fileConfig style file to set various
channels (e.g. roundup.hyperdb) (also called qualname or tags) with
their own logging level, destination (rotating file, socket,
/dev/null) and log format.
This is now a deprecated method in newer logging modules. The
dictConfig format is preferred and allows disabiling other loggers as
well as invoking new loggers in local code. This commit adds support
for it reading the dict from a .json file. It also implements a
comment convention so you can document the dictConfig.
configuration.py:
new code
test_config.py:
test added for the new code.
admin_guide.txt, upgrading.txt CHANGES.txt:
docs added upgrading references the section in admin_guid.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Tue, 19 Aug 2025 22:32:46 -0400 |
| parents | 0663a7bcef6c |
| children | a6c41651f553 |
comparison
equal
deleted
inserted
replaced
| 8422:e97cae093746 | 8423:94eed885e958 |
|---|---|
| 130 input. If JavaScript is not turned on, attached files are lost during | 130 input. If JavaScript is not turned on, attached files are lost during |
| 131 the reauth step. Information from other types of inputs (password, | 131 the reauth step. Information from other types of inputs (password, |
| 132 date, text etc.) do not need JavaScript to work. | 132 date, text etc.) do not need JavaScript to work. |
| 133 | 133 |
| 134 See :ref:`Confirming the User` in the reference manual for details. | 134 See :ref:`Confirming the User` in the reference manual for details. |
| 135 | |
| 136 Support for dictConfig Logging Configuration (optional) | |
| 137 ------------------------------------------------------- | |
| 138 | |
| 139 Roundup's basic log configuration via config.ini has always had the | |
| 140 ability to use an ini style logging configuration to set levels per | |
| 141 log channel, control output file rotation etc. | |
| 142 | |
| 143 With Roundup 2.6 you can use a JSON like file to configure logging | |
| 144 using `dictConfig | |
| 145 <https://docs.python.org/3/library/logging.config.html#logging.config.dictConfig>`_. The | |
| 146 JSON file format as been enhanced to support comments that are | |
| 147 stripped before being processed by the logging system. | |
| 148 | |
| 149 You can read about the details in the :ref:`admin manual <dictLogConfig>`. | |
| 135 | 150 |
| 136 .. index:: Upgrading; 2.4.0 to 2.5.0 | 151 .. index:: Upgrading; 2.4.0 to 2.5.0 |
| 137 | 152 |
| 138 Migrating from 2.4.0 to 2.5.0 | 153 Migrating from 2.4.0 to 2.5.0 |
| 139 ============================= | 154 ============================= |
