Logging
There are two logging options in Spinnaker:
- basic logging - set root (default) and Java Class log levels.
- - configurable log levels, structured JSON output and other features.
The JSON log format available with provides the following key advantages:
- Logging providers index JSON formatted structured logs enabling rich query capabilities.
- Multi-line Java exceptions become a single log line with the exception details stored in the
stack_trace
key.
Add the following per service (eg: orca-local.yml
) or to a shared spinnaker-local.yml
file.
Advanced logging with logback
For more information see the manual:
Create a file called
logback.xml
per Service or to share with below contents:-
For Kubernetes you may wish to use a ConfigMap .
Halyard:
It’s not possible to create an arbitrary
ConfigMap
with Halyard so instead you will need to:In Kubernetes, create a with
logback.xml
.In Halyard, mount the
ConfigMap
using Service Settings - custom volumes .
Logging for some classes can be verbose and it may be preferable to log less.
For example, if the root log level is INFO
you may wish exclude INFO
log output and log at WARN
and below.
Add an block inside the <encoder>
block like so: