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 appenders
    Definition Classes
    client
  • package cbor
    Definition Classes
    client
  • package commons
    Definition Classes
    client
  • package exceptions
    Definition Classes
    client
  • package internal
    Definition Classes
    client
  • package javadsl
    Definition Classes
    client
  • package scaladsl
    Definition Classes
    client
  • BaseLoggerFactory
  • GenericLoggerFactory
  • Keys
  • LoggerFactory
  • LoggingSystemFactory
  • RichException

package scaladsl

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Type Members

  1. abstract class BaseLoggerFactory extends AnyRef
  2. class LoggerFactory extends BaseLoggerFactory

    When using the LoggerFactory, log statements will have @componentName tag with provided prefix

  3. case class RichException(richMsg: Any, cause: Throwable = NoLogException) extends Exception with Product with Serializable

    The common parent of all rich exceptions.

    The common parent of all rich exceptions.

    richMsg

    the rich exception message

    cause

    the optional underlying causing exception

Value Members

  1. object GenericLoggerFactory extends BaseLoggerFactory

    When using the GenericLoggerFactory, log statements will not have @componentName tag

  2. object Keys

    Consumer of logging service can use predefined keys below, while calling Logger api methods

  3. object LoggingSystemFactory

Ungrouped