-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
logging: add config for trace loggers and logging directory (#118)
* logging: add config for trace loggers and logging directory - allow configuring loggers and their specified levels Some loggers can get spammy when debugging, this allows turning them down, or setting other loggers to lower levels than the root To use, set a MODMAIL_{level}_LOGGERS environment variable, delimiting the loggers with `,` Valid levels are all of the valid levels for logging, as follows trace, debug, info, notice, warning, error, critical - add support for configuring the file logging directory The directory for logging files was fully dependent on the current working directory This caused my environment to be littered with logging directories The solution to this was to continue to use the current working directory, unless the parent directory of the bot is also a parent of the cwd, in which case the bot parent directory is used for creating the logging directory. In addition, `MODMAIL_LOGGING_DIRECTORY` has been added as an override environment variable. Setting it will use that directory for logging. * dispatcher: import ModmailLogger from the correct module * logging: add changelog entry * deps: add python-dotenv as a top level dependency * fix: skip trace logging if the log level isn't enabled * fix: fully resolve the provided logging dir
- Loading branch information
1 parent
a89f5d6
commit 8ba34ba
Showing
8 changed files
with
127 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters