Package

org.zalando.hutmann

logging

Permalink

package logging

Visibility
  1. Public
  2. All

Type Members

  1. sealed trait Context extends AnyRef

    Permalink

    Holds context information about what should be logged.

  2. trait FlowIdAware extends AnyRef

    Permalink

    Marks objects that have a flow id.

    Marks objects that have a flow id. Comes with an extractor to get the flow id if needed.

  3. case class JobContext(name: String, flowId: Option[String], startDateTime: ZonedDateTime = ZonedDateTime.now()) extends Context with FlowIdAware with Product with Serializable

    Permalink
  4. class Logger extends AnyRef

    Permalink
  5. case class RequestContext(requestId: Long, flowId: Option[String], requestHeader: RequestHeader, user: Either[AuthorizationProblem, User]) extends Context with FlowIdAware with Product with Serializable

    Permalink

    Context information that should be logged.

    Context information that should be logged.

    requestId

    The play request id that is unique for a request.

    flowId

    The flow id that is used to identify a flow over system boundaries.

    requestHeader

    The request headers the request has. The request body is not forwarded here since you should do that explicitly if you need it.

    user

    The user that issued the request (if any).

Value Members

  1. object Context

    Permalink
  2. object FlowIdAware

    Permalink
  3. object Logger extends Logger

    Permalink

    Replaces the default play logger.

    Replaces the default play logger. Has access functionality that is equal to the play logger, and uses that logger underneath. However, it additionally puts context information in the log output, like flow ids. It does not implement

    LoggerLike

    though, since we change the function declarations.

    Giving an implicit context is needed - you can't simply omit the implicit parameter. This is for a reason: It lets the compiler check if you have enough information to write a logging statement with flow ids, or not - instead of seeing this on the live system when it is too late. If you really do not want to have a context, you can supply the case object

    NoContextAvailable
    • either explicitly, or as an implicit value.

    NoContextAvailable }}}

    LoggerLike }}} function declarations.

    Giving an implicit context is needed - you can't simply omit the implicit parameter. This is for a reason: It lets the compiler check if you have enough information to write a logging statement with flow ids, or not - instead of seeing this on the live system when it is too late. If you really do not want to have a context, you can supply the case object

    NoContextAvailable
    • either explicitly, or as an implicit value.

    NoContextAvailable }}}

  4. object NoContextAvailable extends Context with Product with Serializable

    Permalink

    The default value when no context information is available - in this case, context information logging is omitted.

    The default value when no context information is available - in this case, context information logging is omitted. Must be given explicitly to enforce thinking about what you want to achieve, instead of forgetting to log flow ids and only see it on the live system when it is too late.

  5. object RequestId

    Permalink

Ungrouped