Packages

  • package root
    Definition Classes
    root
  • package csw
    Definition Classes
    root
  • package logging
    Definition Classes
    csw
  • package client

    This is a Actor based logging library which supports writing logs to File and StdOut Console.

    Logging Service

    This is a Actor based logging library which supports writing logs to File and StdOut Console.

    Features
    • Supports component specific log levels, ex. HCD1 can choose to log at info level and HCD2 can choose to log at debug level
    • Supports dynamically changing component log levels
    • Asynchronous thread safe logging
    • Structured logging
    • Supports overriding default logging properties per component viz
    • Intercepting logs from akka/slf4j
    • Supports JSON logging
    LogActor

    LogActor is the heart of logging library. It receives messages from following classes:

    • Slf4jAppender: Intercepts Slf4j logs and forwards it to LogActor via MessageHandler
    • AkkaLogger: Intercepts Akka logs and forwards it to LogActor via MessageHandler.
    • LoggerImpl: Provides csw logging API for component writer to log messages which gets forwarded to LogActor via MessageHandler
    Logging Appenders

    This library supports two types of csw.logging.client.appenders.LogAppender:

    You can specify the appender in application.conf file as shown below:

    csw-logging {
       appenders = ["csw.logging.client.appenders.StdOutAppender$", "csw.logging.client.appenders.FileAppender$"]
     }
    Component Specific Log Levels

    For each component, ComponentLoggingState instance gets created which maintains log levels which are enabled and disabled for this particular component. Every time message gets logged by component, LoggerImpl checks in corresponding componentLoggingState whether current log level enabled or not. If enabled, then only log message gets forwarded to LogActor via MessageHandler.

    You can specify the component specific log levels in application.conf file as shown below:

    component-log-levels {
       tromboneHcd = debug
       tromboneAssembly = error
    }

    ̄ Detailed documentation of Logging Service is available at: https://tmtsoftware.github.io/csw/services/logging.html

    Definition Classes
    logging
  • package internal
    Definition Classes
    client
  • JsonExtensions
  • LoggingSystem

class LoggingSystem extends AnyRef

This class is responsible for programmatic interaction with the configuration of the logging system. It initializes appenders, starts the log actor and manages clean up of logging system. Until and unless this class is instantiated all(akka, slf4j and tmt) the logs are enqueued in local queue. Once it is instantiated, the queue is emptied and all the logs are forwarded to configured appenders.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LoggingSystem
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def addAppenders(_appenderBuilders: LogAppenderBuilder*): Unit
  5. var appenderBuilders: List[LogAppenderBuilder]
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. def getAkkaLevel: Levels

    Get Akka logging levels

    Get Akka logging levels

    returns

    the current and default Akka logging levels.

  11. def getAppenders: List[LogAppenderBuilder]

    Get the logging appenders.

    Get the logging appenders.

    returns

    the current and default logging appenders.

  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  13. def getDefaultLogLevel: Levels

    Get logging levels.

    Get logging levels.

    returns

    the current and default logging levels.

  14. def getLogMetadata(prefix: Prefix): LogMetadata

    Get the basic logging configuration values

    Get the basic logging configuration values

    returns

    LogMetadata which comprises of current root log level, akka log level, sl4j log level and component log level

  15. def getSlf4jLevel: Levels

    Get the Slf4j logging levels.

    Get the Slf4j logging levels.

    returns

    the current and default Slf4j logging levels.

  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. def javaStop(): CompletableFuture[Done]
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  22. def setAkkaLevel(level: Level): Unit

    Changes the Akka logger logging level.

    Changes the Akka logger logging level.

    level

    the new logging level for the Akka logger.

  23. def setAppenders(_appenderBuilders: List[LogAppenderBuilder]): Unit

    Changes the logging appenders.

    Changes the logging appenders.

    _appenderBuilders

    the list of new logging appenders.

  24. def setComponentLogLevel(prefix: Prefix, level: Level): Unit
  25. def setDefaultLogLevel(level: Level): Unit

    Changes the logger API logging level.

    Changes the logger API logging level.

    level

    the new logging level for the logger API.

  26. def setSlf4jLevel(level: Level): Unit

    Changes the slf4j logging level.

    Changes the slf4j logging level.

    level

    the new logging level for slf4j.

  27. val standardHeaders: JsObject

    Standard headers.

  28. def stop: Future[Done]

    Shut down the logging system.

    Shut down the logging system.

    returns

    future completes when the logging system is shut down.

  29. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  30. val system: ActorSystem[Command]
  31. def toString(): String
    Definition Classes
    AnyRef → Any
  32. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  33. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  34. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped