Package

org.apache.logging.log4j

scala

Permalink

package scala

Visibility
  1. Public
  2. All

Type Members

  1. final class Logger extends AnyVal

    Permalink

    Scala wrapper for the Log4j Logger interface.

    Scala wrapper for the Log4j Logger interface.

    Frequently the purpose of logging is to provide information about what is happening in the system, which requires including information about the objects being manipulated. In Scala, you can use string interpolation to achieve this:

    logger.debug(s"Logging in user ${user.getName} with birthday ${user.calcBirthday}")

    Since this wrapper is implemented with macros, the String construction and method invocations will only occur when debug logging is enabled.

  2. trait Logging extends AnyRef

    Permalink

    Mix in this trait into classes from which you want to log, give you a logger value with a Logger named according to the class.

Value Members

  1. object Logger

    Permalink

    Factory for Loggers.

    Factory for Loggers.

    The Logging trait provides a simple way to get a properly named logger into a class.

  2. object LoggingContext extends Map[String, String]

    Permalink

    Manages the context data (context map, MDC) that is added to log events.

    Manages the context data (context map, MDC) that is added to log events.

    A wrapper around org.apache.logging.log4j.ThreadContext.

Ungrouped