Exscript.logger module¶
Logging to memory.
-
class
Exscript.logger.
FileLogger
(logdir, mode=u'a', delete=False, clearmem=True)[source]¶ Bases:
Exscript.logger.Logger
A Logger that stores logs into files.
-
__init__
(logdir, mode=u'a', delete=False, clearmem=True)[source]¶ The logdir argument specifies the location where the logs are stored. The mode specifies whether to append the existing logs (if any). If delete is True, the logs are deleted after they are completed, unless they have an error in them. If clearmem is True, the logger does not store a reference to the log in it. If you want to use the functions from
Exscript.util.report
with the logger, clearmem must be False.
-
-
class
Exscript.logger.
Logfile
(name, filename, mode=u'a', delete=False)[source]¶ Bases:
Exscript.logger.Log
This class logs to two files: The raw log, and sometimes a separate log containing the error message with a traceback.
-
class
Exscript.logger.
Logger
[source]¶ Bases:
future.types.newobject.newobject
A QueueListener that implements logging for the queue. Logs are kept in memory, and not written to the disk.
-
__init__
()[source]¶ Creates a new logger instance. Use the
Exscript.util.log.log_to
decorator to send messages to the logger.
-
-
class
Exscript.logger.
LoggerProxy
(parent, logger_id)[source]¶ Bases:
future.types.newobject.newobject
An object that has a 1:1 relation to a Logger object in another process.