DescriptionHave charm output logged under 'unit', not 'juju'
This branch addresses something that has been bugging me
for some time, and that is that we have all logging on
all the time. Some time back I changed it so we didn't
have debug logging by default, and it was reverted under
the guise of users wanting to see the charm output.
Most of our users are not interested in seeing the internal
guts of juju in their log files. We as developers are
interested, but we have facilities at our control that
makes it easy for us to manage.
This branch also adds a help topic for logging, which
will tell people the various options for how to set
the logging levels.
Charm hook output is now logged with the module:
unit.<unit-id>.<hookname>
I have updated the default logging writer for jujud.
This makes the output from the unit modules different, so we
see something like:
2014-01-17 01:41:30 INFO install Reading package lists...
2014-01-17 01:41:30 INFO install + apt-get -y upgrade
No point duplicating the exact same file and line numbers,
especially when the user doesn't care.
Since the rsyslog tag now specifies the agent tag, in
all-machines.log it now looks like this:
unit-wordpress-0: 2014-01-17 01:41:30 INFO install Reading package lists...
unit-wordpress-0: 2014-01-17 01:41:30 INFO install + apt-get -y upgrade
So we get the unit id and the hook name without bloat.
Other output logging is unchanged.
The environment config is updated so logging for "unit"
is always set to DEBUG unless the user explicitly sets it
to a different value.
As a drive by fix, the juju-log jujuc command now supports
the --level parameter.
https://code.launchpad.net/~thumper/juju-core/fix-charm-logging/+merge/202038
(do not edit description out of merge proposal)
Patch Set 1 #
Total comments: 13
Patch Set 2 : Have charm output logged under 'unit', not 'juju' #
MessagesTotal messages: 4
|