You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Copy file name to clipboardExpand all lines: requirements.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ pycares==4.1.2
25
25
pycparser==2.20 ; python_version>="2.7" and python_version != "3.0" and python_version != "3.1" and python_version != "3.2" and python_version != "3.3"
26
26
pyreadline3==3.3 ; sys_platform=="win32"
27
27
python-dateutil==2.8.2 ; python_version!="3.0"
28
-
python-dotenv==0.19.0 ; python_version>="3.5"
28
+
python-dotenv==0.19.2 ; python_version>="3.5"
29
29
pyyaml==5.4.1 ; python_version>="2.7" and python_version != "3.0" and python_version != "3.1" and python_version != "3.2" and python_version != "3.3" and python_version != "3.4" and python_version != "3.5"
30
30
six==1.16.0 ; python_version>="2.7" and python_version != "3.0" and python_version != "3.1" and python_version != "3.2"
0 commit comments