org.openmdx.kernel.log.impl
Class UniqueFileLoggingMechanism

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

public class UniqueFileLoggingMechanism
extends AbstractFileLoggingMechanism

This logging mechanism is the simplest implementation of a file logging mechanism. It is designed to have one log file per log, with the name of the log as part of the file name. It doesn't do anything fancy like rolling over to a new file when a date changes, it appends all messages to the same file name if already present.


Field Summary
 
Fields inherited from class org.openmdx.kernel.log.impl.AbstractLoggingMechanism
OPEN_DATE_FORMAT
 
Constructor Summary
protected UniqueFileLoggingMechanism()
           
 
Method Summary
static AbstractLoggingMechanism getInstance()
          Returns the mechanism object.
 String getName()
          Returns the name of the mechanism.
protected  boolean isDatedLog()
          This file mechanism is not dated
protected  boolean isSharedLog()
          This file mechanism is not shared
 
Methods inherited from class org.openmdx.kernel.log.impl.AbstractFileLoggingMechanism
close, getActiveEntities, getFileNameSuffixModifier, getPrintWriter, getReadableEntities, getReader, getRemoveableEntities, hasDateRolledOver, logEvent, open, removeEntity, rollLogOver, toString
 
Methods inherited from class org.openmdx.kernel.log.impl.AbstractLoggingMechanism
acceptsNotificationLogs, acceptsPerformanceLogs, acceptsStandardLogs, acceptsStatisticLogs, createFormatter, createNotificationEvent, getDateOpend, getFormatter, getLoggers, isOpen, notifyLogClosed, notifyLoggingLevelChange, notifyLoggingPerformanceChange, notifyLoggingStatisticsChange, notifyLogOpened, setFormatter, setNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UniqueFileLoggingMechanism

protected UniqueFileLoggingMechanism()
Method Detail

getInstance

public static AbstractLoggingMechanism getInstance()
Returns the mechanism object. The mechanism is not shared so it returns each time a new object.

Returns:
A mechanism

isSharedLog

protected boolean isSharedLog()
This file mechanism is not shared

Overrides:
isSharedLog in class AbstractLoggingMechanism
Returns:
false to indicate that the mechanism is not shared

isDatedLog

protected boolean isDatedLog()
This file mechanism is not dated

Specified by:
isDatedLog in class AbstractFileLoggingMechanism
Returns:
false to indicate that the mechanism is not dated

getName

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

Overrides:
getName in class AbstractLoggingMechanism
Returns:
The mechanism name


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