Global Logger¶
Log lines to scribe using the default global logger.
-
exception
clog.global_state.
LoggingNotConfiguredError
¶
-
clog.global_state.
check_create_default_loggers
()¶ Set up global loggers, if necessary.
-
clog.global_state.
create_preferred_backend_map
()¶ PyStaticConfig doesn’t support having a map in the configuration, so we represent a map as a list, and we use this function to generate an actual python dictionary from it.
-
clog.global_state.
log_line
(stream, line)¶ Log a single line to the global logger(s). If the line contains any newline characters each line will be logged as a separate message. If this is a problem for your log you should encode your log messages.
Parameters: - stream – name of the scribe stream to send this log
- line – contents of the log message
-
clog.global_state.
reset_default_loggers
()¶ Destroy the global
clog
loggers. This must be done when forking to ensure that children do not share a desynchronized connection to ScribeAny writes after this call will cause the loggers to be rebuilt, so this must be the last thing done before the fork or, better yet, the first thing after the fork.