org.openmdx.kernel.log.slf4j
Class SLF4JLoggingMechanism

java.lang.Object
  extended by org.openmdx.kernel.log.impl.AbstractLoggingMechanism
      extended by org.openmdx.kernel.log.slf4j.SLF4JLoggingMechanism
All Implemented Interfaces:
ManageableMechanism

public class SLF4JLoggingMechanism
extends AbstractLoggingMechanism

This logging mechanism delegates to SLF4J.


Field Summary
protected static int NULL
           
 
Fields inherited from class org.openmdx.kernel.log.impl.AbstractLoggingMechanism
OPEN_DATE_FORMAT
 
Constructor Summary
protected SLF4JLoggingMechanism()
          Constructor
 
Method Summary
 boolean acceptsStatisticLogs()
          This mechanism accepts statistics logs
static AbstractLoggingMechanism getInstance()
          Returns the mechanism object.
protected  int getLogLevel(Logger logger, Marker marker, int level)
          Maps an openMDX level to a LocationAwareLogger Level ERROR ← CRITICAL_ERROR ERROR ← ERROR WARN ← WARNING INFO ← INFO DEBUG ⇆ DETAIL TRACE ⇆ TRACE INFO ← PERFORMANCE INFO ← STATISTIC INFO ← NOTIFICATION
 String getName()
          Returns the name of the mechanism.
protected  void logEvent(Log log, LogEvent event)
          Logs a log event.
 
Methods inherited from class org.openmdx.kernel.log.impl.AbstractLoggingMechanism
acceptsNotificationLogs, acceptsPerformanceLogs, acceptsStandardLogs, close, createFormatter, createNotificationEvent, getActiveEntities, getDateOpend, getFormatter, getLoggers, getReadableEntities, getReader, getRemoveableEntities, isOpen, isSharedLog, notifyLogClosed, notifyLoggingLevelChange, notifyLoggingPerformanceChange, notifyLoggingStatisticsChange, notifyLogOpened, open, removeEntity, setFormatter, setNotification, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NULL

protected static int NULL
Constructor Detail

SLF4JLoggingMechanism

protected SLF4JLoggingMechanism()
Constructor

Method Detail

getInstance

public static AbstractLoggingMechanism getInstance()
Returns the mechanism object. The mechanism is shared so it returns a singleton

Returns:
the mechanism singleton

getName

public String getName()
Returns the name of the mechanism.

Overrides:
getName in class AbstractLoggingMechanism
Returns:
The mechanism name

acceptsStatisticLogs

public boolean acceptsStatisticLogs()
This mechanism accepts statistics logs

Overrides:
acceptsStatisticLogs in class AbstractLoggingMechanism
Returns:
true to indicate that the mechanism accepts statistics

logEvent

protected void logEvent(Log log,
                        LogEvent event)
Logs a log event.

Specified by:
logEvent in class AbstractLoggingMechanism
Parameters:
log - A logger
event - A log event

getLogLevel

protected int getLogLevel(Logger logger,
                          Marker marker,
                          int level)
Maps an openMDX level to a LocationAwareLogger Level
  1. ERROR ← CRITICAL_ERROR
  2. ERROR ← ERROR
  3. WARN ← WARNING
  4. INFO ← INFO
  5. DEBUG ⇆ DETAIL
  6. TRACE ⇆ TRACE

Parameters:
level - the openMDX log level
Returns:
the openMDX log level corresponding to a given log4j level.


This software is published under the BSD license. Copyright © 2003-2007, OMEX AG, Switzerland, All rights reserved. Use is subject to license terms.