You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 16 Next »

The C++ implementation of the logging system is based in ACE Logging and is part of the ACS/LGPL/CommonSoftware/logging module. Additionally there's the ACSLog service in ACS/LGPL/CommonSoftware/acslog module, which offers an entry point for using the logging system by any part of the system. Specifically it is used by Python logging framework for connecting with the central logger.

Design

Class Diagram

Details

BaseLog

The base log is an abstract parent class for several classes in the logging implementation and it also defines some basic information:

  • Priority enum defining log levels
  • FIELD_UNAVAILABLE
  • GLOBAL_LOGGER_NAME
  • ANONYMOUS_LOGGER_NAME
  • STATIC_LOGGER_NAME

As a parent class it defines several interface methods as well as implementing a couple of implementation-agnostic methods to be used by child classes.

It holds a reference to a LoggingStatistics instance, but it does not use it directly, this is to be used by child classes to calculate statistics about the logging calls.

LoggingStatistics

The LoggingStatistics class is utility class for calculating and storing statistics about the logs that have been processed by a specific logger. There are some configurable parameters:

  • statisticsCalculationPeriod: Time used for retrieving data before calculating statistics. Default 10 minutes.
  • statisticsGranularity: Time unit used for calculations (i.e. logs per second, logs per minute, etc.). Default 1 second.

It calculates 5 statistics:

  • messageStatistics: Number of log messages per granularity unit.
  • errorStatistics: Number of log errors per granularity unit.
  • messageIncrement: Number of log messages since last calculation.
  • errorIncrement: Number of log errors since last calculation.
  • actualStatisticsPeriod: Actual period of time which was used to gather data before calculating statistics.
    • Usually close to statisticsCalculationPeriod
    • May be different when there's a change of configuration or during the destruction of the logger

Logger

LogTrace

Logger_ptr

StopWatch

Loggable

GenericLogger

ACSLogger

Handler

StdoutHandler

LogSvcHandler

ACE_Log_Msg

LoggingProxy

LogLevelDefinition

LogThrottle

LogThrottleAlarm

CentralLogger

ACE_Log_Msg_Backend

CacheLogger

LocalFileLogger

LocalSyslogLogger

RemoteSyslogLogger

Module: logging

The module has two libraries and to executables:

  • libbaselogging.so
  • liblogging.so
  • loggingService
  • loggingClient

Library: baselogging

Library: logging

Executable: loggingService

Executable: loggingClient

Module: acslog

The module has only one executable

  • acsLogSvc

Executable: acsLogSvc

  • No labels