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 scaladsl
    Definition Classes
    client
  • BaseLoggerFactory
  • GenericLoggerFactory
  • Keys
  • LoggerFactory
  • LoggingSystemFactory
  • RichException

class LoggerFactory extends BaseLoggerFactory

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

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

Instance Constructors

  1. new LoggerFactory(prefix: Prefix)

    prefix

    to appear in log statements

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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def asJava: JLoggerFactory

    Returns the java API for this instance of LoggerFactory

  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  10. def getLogger: Logger
    Definition Classes
    BaseLoggerFactory
  11. def getLogger(ctx: ActorContext): Logger
    Definition Classes
    BaseLoggerFactory
  12. def getLogger[T](ctx: ActorContext[T]): Logger
    Definition Classes
    BaseLoggerFactory
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  18. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  19. def toString(): String
    Definition Classes
    AnyRef → Any
  20. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  21. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  22. 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 BaseLoggerFactory

Inherited from AnyRef

Inherited from Any

Ungrouped