Exscript.util.log module

Logging utilities.

Exscript.util.log.log_to(logger)[source]

Wraps a function that has a connection passed such that everything that happens on the connection is logged using the given logger.

Parameters:logger (Logger) – The logger that handles the logging.
Exscript.util.log.log_to_file(logdir, mode='a', delete=False, clearmem=True)[source]

Like log_to(), but automatically creates a new FileLogger instead of having one passed. Note that the logger stays alive (in memory) forever. If you need to control the lifetime of a logger, use log_to() instead.