Logging

    There are two logging options in Spinnaker:

    1. basic logging - set root (default) and Java Class log levels.
    2. - configurable log levels, structured JSON output and other features.

    The JSON log format available with provides the following key advantages:

    1. Logging providers index JSON formatted structured logs enabling rich query capabilities.
    2. 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:

    1. Create a file called logback.xml per Service or to share with below contents:

    2. 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:

      1. In Kubernetes, create a with logback.xml.

      2. 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: