alogging.filters.process_context module¶
-
class
alogging.filters.process_context.
CurrentProcess
(args=None)[source]¶ Bases:
object
Info about current process.
logging.LogRecords include ‘processName’, but it is also fairly bogus (ie, ‘MainProcess’).
So check sys.argv for a better name. Also get current user.
-
class
alogging.filters.process_context.
ProcessContextLoggingFilter
(name='')[source]¶ Bases:
object
Filter that adds cmd_name, cmd_line, and user to log records
- cmd_name is the basename of the executable running (‘myscript.py’)
- as opposed to log record field ‘processName’ which is typically something like ‘MainProcess’.
cmd_line is the full cmdline. ie, sys.argv joined to a string,
user is the user the process is running as.