Commit Graph

5 Commits

Author SHA1 Message Date
Piotr F. Mieszkowski 6ca5db2db3 Issue an INFO log entry after configuring logging
Also: reformat with spaces instead of tabs.
2023-11-12 19:57:12 +01:00
Piotr F. Mieszkowski b627fde510 Move gpg-mailgate.py logic to lacre.mailgate module
gpg-mailgate.py script keeps its role, but only needs to call code defined in
lacre.mailgate.
2022-06-11 21:00:42 +02:00
Piotr F. Mieszkowski 4c6fdc52ec Check mandatory config early, add tests
Also: extend failover logging configuration with file-based handler to make
sure that the user gets _some_ logs even if they do not configure Lacre at
all.
2022-05-31 22:09:10 +02:00
Piotr F. Mieszkowski 75ccfb0850 Use logging module
- Replace custom logging code with calls to logging module.
- Use logging.config to provide configuration parameters.

To make Lacre's logging more flexible, use fileConfig from logging.config to
set up all parameters.  If the configuration file is missing, use dictConfig
with hardcoded reasonable defaults.
2022-05-06 19:39:56 +02:00
Piotr F. Mieszkowski d90b50f7e7 Extract config, separate logging, split into smaller functions
- Move configuration-processing code to a separate module (lacre.config) and
  provide a simple API to access configuration parameters.
- Prepare to use builtin logging module to log diagnostic data.
- Rework the configuration-processing file to make it cleaner.
- Log additional information while processing configuration.
- Reorder functions.
2022-05-06 19:39:56 +02:00