org.openmdx.kernel.log.impl
Class SocketLoggingMechanism

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

public class SocketLoggingMechanism
extends AbstractLoggingMechanism

This logging mechanism logs events to a socket stream.


Field Summary
 
Fields inherited from class org.openmdx.kernel.log.impl.AbstractLoggingMechanism
OPEN_DATE_FORMAT
 
Constructor Summary
protected SocketLoggingMechanism()
           
 
Method Summary
 boolean acceptsStatistics()
          This mechanism accepts statistics logs
protected  void close()
          This method closes the particular logging mechanism so that messages no longer get logged to the mechanism.
static AbstractLoggingMechanism getInstance()
          Returns the mechanism object.
 String getName()
          Returns the name of the mechanism.
protected  void logEvent(Log log, LogEvent event)
          Logs a log event.
protected  void notifyLogClosed(Log log)
          Log a message that a logger was closed on this mechanism
protected  void notifyLoggingLevelChange(Log log, int loggingLevel)
          Log a log level change
protected  void notifyLoggingPerformanceChange(Log log, boolean state)
          Log a performance change
protected  void notifyLoggingStatisticsChange(Log log, boolean state)
          Put out a nice message that a log changed its statistics state
protected  void notifyLogOpened(Log log, int loggingLevel)
          Do not handle any kind of notification events
protected  void open(Log log)
          This method opens the particular logging mechanism so that messages can be output.
 String toString()
          Return a debug string.
 
Methods inherited from class org.openmdx.kernel.log.impl.AbstractLoggingMechanism
acceptsNotificationLogs, acceptsPerformanceLogs, acceptsStandardLogs, acceptsStatisticLogs, createFormatter, createNotificationEvent, getActiveEntities, getDateOpend, getFormatter, getLoggers, getReadableEntities, getReader, getRemoveableEntities, isOpen, isSharedLog, removeEntity, setFormatter, setNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SocketLoggingMechanism

protected SocketLoggingMechanism()
Method Detail

getInstance

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

Returns:
the mechanism singleton

open

protected void open(Log log)
This method opens the particular logging mechanism so that messages can be output.

Overrides:
open in class AbstractLoggingMechanism
Parameters:
log - A Logger

close

protected void close()
This method closes the particular logging mechanism so that messages no longer get logged to the mechanism.

Overrides:
close in class AbstractLoggingMechanism

notifyLogOpened

protected void notifyLogOpened(Log log,
                               int loggingLevel)
Do not handle any kind of notification events

Overrides:
notifyLogOpened in class AbstractLoggingMechanism
Parameters:
log - A logger

notifyLogClosed

protected void notifyLogClosed(Log log)
Description copied from class: AbstractLoggingMechanism
Log a message that a logger was closed on this mechanism

Overrides:
notifyLogClosed in class AbstractLoggingMechanism
Parameters:
log - A logger

notifyLoggingLevelChange

protected void notifyLoggingLevelChange(Log log,
                                        int loggingLevel)
Description copied from class: AbstractLoggingMechanism
Log a log level change

Overrides:
notifyLoggingLevelChange in class AbstractLoggingMechanism
Parameters:
log - A logger

notifyLoggingPerformanceChange

protected void notifyLoggingPerformanceChange(Log log,
                                              boolean state)
Description copied from class: AbstractLoggingMechanism
Log a performance change

Overrides:
notifyLoggingPerformanceChange in class AbstractLoggingMechanism
Parameters:
log - A logger
state - A new performance logging state

notifyLoggingStatisticsChange

protected void notifyLoggingStatisticsChange(Log log,
                                             boolean state)
Description copied from class: AbstractLoggingMechanism
Put out a nice message that a log changed its statistics state

Overrides:
notifyLoggingStatisticsChange in class AbstractLoggingMechanism
Parameters:
log - A logger
state - A new state to be logged as notification

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

acceptsStatistics

public boolean acceptsStatistics()
This mechanism accepts statistics logs

Returns:
true to indicate that the mechanism accepts statistics

getName

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

Overrides:
getName in class AbstractLoggingMechanism
Returns:
The mechanism name

toString

public String toString()
Return a debug string.

Overrides:
toString in class AbstractLoggingMechanism
Returns:
A mechanism description


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