Logging in ACE

All log information from ACE services are logged to standard Docker output.

Application logs

Application logs generally follow the standard Java log levels:

  • FINEST: Providing highly detailed tracing message.
  • FINER: Providing fairly detailed tracing message.
  • FINE: Providing tracing information.
  • INFO: General information. Might be interesting when following up on what a service is doing, but should not contain any critical run-level information.
  • WARNING: There is an issue - such as a dependent service not being available - but the operation will in most cases be re-attempted in a short while.
  • SEVERE: A severe error occurred that must be investigated immediately, will probably prevent normal program execution.

Request logs

By default, all requests to an ACE service will be logged to standard Docker output. There are however two separate log filter factories included in ACE which can be used to limit which requests are logged.

  • Status code request log filter - status-filter-factory - which will let you filter the request log based on HTTP status code.

  • Path request log filter - path-filter-factory - which will let you filter the request log based on request paths.

NOTE: The path request log filter only work with exact request path matches.

Request log filters are specified as part of the ACE service server configuration. Please see the Content Service configuration for context and an example.

ACE request log filters follow the same general rules and precedence ordering as Logback filters. Possible values for the action part of a rule are the same as for Logback as well: NEUTRAL, ACCEPT, DENY.

For example, given the following server configuration of an ACE service:

server:
  requestLog:
    appenders:
      - type: console
        filterFactories:
          - type: path-filter-factory
            rules:
              - path: /healthcheck
                action: ACCEPT

              - path: /secret
                action: DENY

          - type: status-filter-factory
            rules:
              - from: 100
                to: 399
                action: DENY

The result will be that:

  • Requests to path /secret WILL NOT be logged regardless of request status or any additional filter configuration.
  • Requests to path /health-check WILL be logged regardless of request status or any additional filter configuration.
  • Requests with a request status in range 100 <= status <= 399 WILL NOT be logged.
  • Any other request will be logged as it would normally be.