Juju Logging - juju/juju GitHub Wiki

Configuring log levels in Juju:

1.25:

juju set-env logging-config="<root>=DEBUG"

2.0:

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

You can also set different logging levels for different packages in juju like this:

juju model-config logging-config="<root>=INFO;juju.container.lxd=DEBUG"

For 2.0, to change the logging level for actions around managing models, you will need to change the log level in the controller model:

juju model-config logging-config="<root>=DEBUG" -m controller

The levels of logging you can specify are:

  • ERROR
  • WARN
  • INFO
  • DEBUG
  • TRACE

When debugging a juju problem, it is suggested to use a DEBUG log level as you will see the API calls made. For example this log entry shows the request to deploy a new application:

2016-06-16 17:56:27 DEBUG juju.apiserver apiserver.go:291 <- [18] user-admin@local {"RequestId":3,"Type":"Application","
Version":1,"Request":"Deploy","Params":"'params redacted'"}

Setting the log level to TRACE will show the API requests without the params redacted. This entry also shows a request to deploy an application, but with all the parameters passed in:

2016-06-16 18:10:20 TRACE juju.apiserver apiserver.go:289 <- [32] user-admin@local {"RequestId":3,"Type":"Application","Version":1,"Request":"Deploy","Params":{"Applications":[{"ApplicationName":"wordpress-demo","Series":"trusty","CharmUrl":"cs:trusty/wordpress-4","Channel":"stable","NumUnits":1,"Config":null,"ConfigYAML":"","Constraints":{},"Placement":null,"Storage":null,"EndpointBindings":null,"Resources":null}]}}
⚠️ **GitHub.com Fallback** ⚠️