Juju Logging
Reed O'Brien edited this page Jan 9, 2017
·
2 revisions
Pages 44
- Home
- API best practices
- Azure provider design implementation notes
- Blocking bugs
- Bootstrap Internals (WIP)
- Boring Techniques
- Bug fixes and patching
- CI Tests
- Code Review Checklists
- Containers
- Creating New Repos
- Debugging Juju
- Debugging Juju Misc Topics Pointers
- Debugging Races
- Diagnosing MongoDB Performance
- Faster LXD
- Feature Documentation
- Getting Mongo dump
- Guidelines for writing workers
- Hacking upload tools
- howto: implement effective config structs
- Implementing environment providers
- Incomplete Transactions and MgoPurge
- Interactive Commands
- Intermittent failures
- Juju Logging
- Juju Scripts
- Juju Storage (WIP)
- Juju User Documentation
- KVM instance creation
- Login into MongoDB
- Managing complexity
- mgo txn example
- MgoPurgeTool
- Misc Topics
- Mongo Issues
- MongoDB and Consistency
- pprof facility
- Reviewboard Tips and Tricks
- Stop Start Machine Agent
- Stress Test
- Triaging Bugs
- Update Launchpad Dependency
- Writing Unit Tests
- Show 29 more pages…
Navigation
Testing
Releases
Documentation
Development
- READ BEFORE CODING
- Blocking bugs process
- Bug fixes and patching
- Contributing
- Code Review Checklists
- Creating New Repos
-
MongoDB and Consistency
- [mgo/txn Example] (https://github.com/juju/juju/wiki/mgo-txn-example)
- Scripts
- Update Launchpad Dependency
- Writing workers
- Reviewboard Tips
Debugging and QA
- Debugging Juju
- [Faster LXD] (https://github.com/juju/juju/wiki/Faster-LXD)
Clone this wiki locally
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}]}}