Alert.png The wiki is deprecated and due to be decommissioned by the end of September 2022.
The content is being migrated to other supports, new updates will be ignored and lost.
If needed you can get in touch with EGI SDIS team using operations @ egi.eu.

Difference between revisions of "TCB:Logging Working Group"

From EGIWiki
Jump to navigation Jump to search
Line 108: Line 108:


=== Logging level mapping ===
=== Logging level mapping ===
The following table correlates the various logging level definition and semantics from the analysed frameworks.


{| border="1"
{| border="1"
Line 192: Line 194:
| -
| -
|}
|}
It seem apparent that many frameworks adopt a common logging granularity of five different logging levels, with large overlap in their respective definitions. Moreover, the naming reflects this overlap except for the most critical impact (severe, critical as opposed to fatal), and debugging levels (fine, as opposed to debug).
Tracing is often folded into the debugging area of logging; ideally, a production infrastructure system admin should never worry to configure the systems on a debugging log level.
A "config" debug level is an interesting concept for an initial emitting of static configuration (i.e. read off a static configuration file at startup) but is not supported on any other examined logging frameworks. It can easily map to logging these on INFO level.
A more serious issue is the widespread support - and distinction! - between FATAL and ERROR situations. The common understanding seem that FATAL describes an unrecoverable situation and the service may shut down, or may behave entirely unpredictable, and ERROR describing a situation where a requested function or behaviour was not carried out. The difference between FATAL and ERROR seem the difference in the assessment whether the incident/situation/context is permanent (--> fatal) or transient (--> error). However, this distinction is not made in the default Oracle Java logging subsystem, and that needs to be taken care of.


== Logging domains ==
== Logging domains ==

Revision as of 18:59, 30 January 2012


WG Charter

With the [TCB-9 Face to Face] meeting the TCB members agreed to set up a Working Group to address short-term and long-term issues related to logging infrastructure and log messages across Technology Providers.

The WG shall have a lifetime of 6 months and regularly report progress to the TCB through written reports and presentations at TCB meetings.

Representatives shall be sourced from EGI operations and Technology Providers currently contributing software deployed (or planned to be deployed) onto the EGI produciton infrastructure.

Representatives

Role Name Affiliation
WG coordinator Michel Drescher Technical Manager, EGI.eu
EGI Operations representative
EGI SPG representative
Technology Provider EMI (European Middleware Initiative)
Technology Provider / Platform integrator IGE (Initiative for Globus in Europe)
Technology Provider SAGA (Simple API for Grid Applications)
Technology Provider StratusLab

Roadmap

WG duration: 6 months

Rough timeline:

Short term

  • Define taxonomies

Medium/long term

  • Config file harmonisation
  • Default configuration (EGI Ops/Security policy)
  • Common service configuration interface
  • Fabric management integration

Logging taxonomy

Logging levels

Logging levels indicate the severity of the logged incident. As the name indicates logging levels are implicitly ordered, in a filtering, or threshold model.

Logging levels are used in two components of a logging framework:

  • When a log message is assembled in software code and sent at a defined level to the logging framework
  • In a logging related configuration that controls the actual behaviour of the logging framework

When a specific logging level is configured for a given logging domain, then all messages of that level and of all higher levels are realised (e.g. printed to the console, a log file, etc.)

Available frameworks

Logging frameworks define different log level granularity, and at times even mixing the scope (or domain). For example:

Oracle Java6

Oracle Java 6 contains a default logging system for Java since the inception of Java 4. Since the logging subsystem is located in the java.lang namespace, it MUST be implemented in any compliant Java VM (OpenJDK, etc.) as well, and therefore is ubiquitously available on all Java platforms.

Number of levels: 7 (SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST) [1]

Apache Log4* / Apache Commons

Apache Log4* used to be a separate Logging module (for Java), but has recently replaced the Apache Commons implementation for Java logging. Apache Log4* is available with a multitude of language bindings, e.g. C, C++, Java. It defines logging levels (in order of descending order) as follows:

Number of levels: 6 (FATAL, ERROR, WARN, INFO, DEBUG, TRACE) [2]

Python 2.7.2

Python 2.7.2, just as Java, provides a default platform-wide logging subsystem and therefore will be available anywhere where Python is available.

Number of levels: 5 (CRITICAL, ERROR, WARNING, INFO, DEBUG) [3]

Ruby 1.9.3

Ruby 1.9.3 also provides a standard library for logging in Ruby, therefore available on all platforms where Ruby will be provided for.

Number of levels: 5 (CRITICAL, ERROR, WARNING, INFO, DEBUG) [4]

GNOME glibc 2.30.2

Loggers are available for C and C++. Apart from multi-language binding loggers (e.g. Apache Commons) the very popular GNOME glibc] provides a widely available logging subsystem.

Number of levels: 5 (CRITICAL, ERROR, WARNING, MESSAGE, DEBUG) [5]

Logging level mapping

The following table correlates the various logging level definition and semantics from the analysed frameworks.

Relative order EGEE JRA1 Apache Log4* Oracle Java 6 Python 2.7.2 Ruby 1.9.1 PERL/Log4perl glibc 2.30.2
1 FATAL FATAL SEVERE CRITICAL FATAL FATAL CRITICAL
2 ERROR ERROR - ERROR ERROR ERROR ERROR
3 WARN WARN WARN WARNING WARN WARN WARNING
4 INFO INFO INFO INFO INFO INFO MESSAGE
5 - - CONFIG - - - -
6 DEBUG DEBUG FINE DEBUG DEBUG DEBUG DEBUG
7 - TRACE FINER - - TRACE -
8 - - FINEST - - - -


It seem apparent that many frameworks adopt a common logging granularity of five different logging levels, with large overlap in their respective definitions. Moreover, the naming reflects this overlap except for the most critical impact (severe, critical as opposed to fatal), and debugging levels (fine, as opposed to debug).

Tracing is often folded into the debugging area of logging; ideally, a production infrastructure system admin should never worry to configure the systems on a debugging log level.

A "config" debug level is an interesting concept for an initial emitting of static configuration (i.e. read off a static configuration file at startup) but is not supported on any other examined logging frameworks. It can easily map to logging these on INFO level.

A more serious issue is the widespread support - and distinction! - between FATAL and ERROR situations. The common understanding seem that FATAL describes an unrecoverable situation and the service may shut down, or may behave entirely unpredictable, and ERROR describing a situation where a requested function or behaviour was not carried out. The difference between FATAL and ERROR seem the difference in the assessment whether the incident/situation/context is permanent (--> fatal) or transient (--> error). However, this distinction is not made in the default Oracle Java logging subsystem, and that needs to be taken care of.

Logging domains

A suggestion of logging domains

  • Security
    (where is the distinction to service access?)
  • Service access
  • Service management

Logging message composition

Logging infrastructure

Configuration

Config file vs. service management integration

Supported solutions

Fabric management integration