Comment 18 for bug 1893993

Revision history for this message
John A Meinel (jameinel) wrote :

INFO was the intentional default, and when I was bootstrapping and testing it, it is what I was seeing. I'm not sure where WARNING vs INFO is coming into play, but we can investigate.

As far as the log messages:
2020-09-08 14:55:42 DEBUG juju.worker.logger logger.go:92 reconfiguring logging from "<root>=DEBUG" to "<root>=WARNING"

All Agents default to DEBUG until the point they can connect to the controller and determine what their logging should be.
If you are seeing that exact message, that means that for that agent, its configured logging is <root>=WARNING and not <root>=DEBUG.

Note that each model has a separate logging configuration. I can't tell from those messages what agent is running, and it what model. (eg, the *controller itself* runs in the 'controller' model, while the applications you are deploying probably run in a different model.)
If you are reusing a controller, and want each newly created model to have a default logging config, you would use:

juju model-defaults logging-config="<root>=DEBUG"

(or if you 'juju bootstrap' with --debug, it will also set all the logging defaults to DEBUG.)

For the issues with "not showing python tracebacks". Juju has code that all stdout and stderr from a hook gets logged at DEBUG level.
https://github.com/juju/juju/blob/fa71c7819f2203f8d71fd9987eb38a630bcdddb1/worker/uniter/runner/runner.go#L582
https://github.com/juju/juju/blob/fa71c7819f2203f8d71fd9987eb38a630bcdddb1/worker/uniter/runner/runner.go#L475

It wouldn't be hard to change that up and have the loggerAdaptor take a parameter of the logging level, and have 2 pipes, one for stdout and one for stderr.

We already do that if we are running an action, we could just do it always and have stderr logging at a different level.