New dependency added r1250: launchpad.net/loggo
Tim Penhey
tim.penhey at canonical.com
Wed Jun 5 02:57:37 UTC 2013
Hi guys,
I have now integrated the loggo hierarchical loggers into juju-core.
You will need to update you source trees to bring in this project.
Instead of using the juju-core/log package to log stuff out, you can now
just create a logger for each package.
e.g.
var logger = loggo.GetLogger("juju.state.machine")
and log stuff out using:
logger.Debug("something %s", foo)
or
logger.Info("something")
You can customize the logging levels on a module by module basis, that
is controlled by the dotted names.
Ideally I'd like to get us to a state where we can set a config value on
any machine (or agent) that can specify a log config string. These look
something like this:
<root>=WARNING:juju=INFO:juju.state=DEBUG:juju.uniter=TRACE
The command line tool has been adjusted so --debug just sets juju=DEBUG,
which means the trace functions aren't shown. It is very fast to log
something which doesn't end up getting written. So we don't need Debug
flags in modules any more, we can just log at debug level, and then
control output.
Tim
More information about the Juju-dev
mailing list