+.. _log:
+
Moe Logging
===========
-One `Loggers` object is created for Eval, initializing 4 subloggers (see class description).
+`Loggers` is a collection of logggers for :class:`~moe.eval.Eval`, initializing 4 subloggers (see class description).
-Use as `e.log.debug(...)` for both test and main log, `e.log.user.debug(...)` for `user` and other logs.
+Use as `e.log.debug(...)` for main log that goes both to `test` and `main` log,
+`e.log.test.debug(...)` for individual logs.
.. autoclass:: moe.log.Loggers
:members:
- :member-order: bysource
raise moe.MoeError, "Cannot create %s: %s" % (test, err.strerror)
def debug_dump_config(self):
- "Dumps at level DDEBUG and only compiles the dump if main level low enough."
+ "Dumps config at level DDEBUG (only compiles the dump if main level is low enough)."
if self.log.level <= 5:
- self.log.ddebug('****** Config dump: ******'))
+ self.log.ddebug('****** Config dump: ******')
self.log.ddebug(self.config.dump('**** '))
- self.log.ddebug('**************************'))
+ self.log.ddebug('**************************')
def debug_dump_pipe(self, pipe):
- "Dumps at level DDEBUG and only compiles the dump if main level low enough."
+ "Dumps pipeline `pipe` at level DDEBUG (only compiles the dump if main level low enough)."
if self.log.level <= 5:
- self.log.ddebug('****** Pipeline %r dump: ******'%pipe,name))
+ self.log.ddebug('****** Pipeline %r dump: ******'%pipe,name)
self.log.ddebug(pipe.dump(prefix='**** '))
- self.log.ddebug('**************************'))
+ self.log.ddebug('**************************')
#TODO ...
def init_task(self):
per-test log, initially no handler, to be directed to file like `{TEST}.log`
.. note:: Currently, the logs and fd's get never closed.
- .. note:: Currently, the `Loggers.open_eval_log` changes fd's 1 and 2 by default, this is a global change.
+ .. warning:: `Loggers.open_eval_log` changes global fd's 1 and 2 by default.
"""
def __init__(self):
"Initialize loggers as described in class description."