org.jagatoo.logging
Class LogManager

java.lang.Object
  extended by org.jagatoo.logging.LogManager

public class LogManager
extends java.lang.Object

This object manages multiple logs. This provides a single point at which the application can write to logs, but allows log control to be handled centrally. Multiple LogInterface objects are registered with the logger. The LogManager will step through them when a logging message comes in and give each LogInterface an opportunity to consume the log message.


Method Summary
 void addDebuggingPackage(java.lang.String pkg)
           
 boolean areChannelsVisible()
           
 void deregisterLog(LogInterface log)
          This method allows you to deregister a class that implements the LogInterface.
 java.util.HashSet<java.lang.String> getDebuggingPackageFiler()
           
 int getIndentation()
           
 java.lang.String getIndentationString()
           
static LogManager getInstance()
           
 boolean isAnyLogInterfaceRegistered(LogChannel channel, int logLevel)
           
 boolean isTimestampingEnabled()
           
 void refreshLogInterfaces()
          Must be called, if the logLevel of a registeredLogInterface has been changed.
 void registerLog(LogInterface log)
          This method allows you to register a class that implements the LogInterface.
 void removeDebuggingPackage(java.lang.String pkg)
           
 void setChannelsVisible(boolean visible)
           
 void setIndentation(int indentation)
          Sets the indentation level to use for the following log outputs.
 void setIndentationString(java.lang.String indentationString)
          Sets the String to be prefixed to the actualy logging output n times.
 void setTimestampingEnabled(boolean enabled)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setIndentationString

public final void setIndentationString(java.lang.String indentationString)
Sets the String to be prefixed to the actualy logging output n times.

Parameters:
indentationString -

getIndentationString

public final java.lang.String getIndentationString()
Returns:
the String to be prefixed to the actualy logging output n times.

setIndentation

public final void setIndentation(int indentation)
Sets the indentation level to use for the following log outputs.

Parameters:
indentation -

getIndentation

public final int getIndentation()
Returns:
the indentation level to use for the following log outputs.

setTimestampingEnabled

public final void setTimestampingEnabled(boolean enabled)

isTimestampingEnabled

public final boolean isTimestampingEnabled()

setChannelsVisible

public final void setChannelsVisible(boolean visible)

areChannelsVisible

public final boolean areChannelsVisible()

addDebuggingPackage

public final void addDebuggingPackage(java.lang.String pkg)

removeDebuggingPackage

public final void removeDebuggingPackage(java.lang.String pkg)

getDebuggingPackageFiler

public final java.util.HashSet<java.lang.String> getDebuggingPackageFiler()

refreshLogInterfaces

public final void refreshLogInterfaces()
Must be called, if the logLevel of a registeredLogInterface has been changed.


registerLog

public final void registerLog(LogInterface log)
This method allows you to register a class that implements the LogInterface. Every log so registered will get a copy of every log message, along with its mask.


deregisterLog

public final void deregisterLog(LogInterface log)
This method allows you to deregister a class that implements the LogInterface. Every log so deregistered won't get a copy of every log message anymore.


isAnyLogInterfaceRegistered

public final boolean isAnyLogInterfaceRegistered(LogChannel channel,
                                                 int logLevel)

getInstance

public static final LogManager getInstance()
Returns:
the LogManager's singleton instance.