LogManager

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jagatoo.logging
Class LogManager

    java.lang.Object
      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.

Author:
  David Yazel, Marvin Froehlich (aka Qudus)

Method Summary
`void` | `addDebuggingPackage(java.lang.String pkg)`
`boolean` | `areChannelsVisible()`
`void` | `deregisterLog(LogHandler 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` | `print(LogChannel channel, int logLevel, java.lang.Object[] message)` This method will call all the log objects to store the message, if they want to.
`void` | `printCS(LogChannel channel, int logLevel, java.lang.Object[] message)` This method will call all the log objects to store the message, if they want to.
`void` | `println(LogChannel channel, int logLevel, java.lang.Object[] message)` This method will call all the log objects to store the message, if they want to.
`void` | `printlnCS(LogChannel channel, int logLevel, java.lang.Object[] message)` This method will call all the log objects to store the message, if they want to.
`void` | `refreshLogInterfaces()` Must be called, if the logLevel of a registeredLogInterface has been changed.
`void` | `registerLog(LogHandler 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(LogHandler 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.

  Parameters:
    `log` -

### deregisterLog

    public final void deregisterLog(LogHandler 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.

  Parameters:
    `log` -

### isAnyLogInterfaceRegistered

    public final boolean isAnyLogInterfaceRegistered(LogChannel channel,
                                                     int logLevel)

### print

    public final void print(LogChannel channel,
                            int logLevel,
                            java.lang.Object[] message)

  This method will call all the log objects to store the message, if they want to.

  Parameters:
    `channel` -
    `logLevel` - the logLevel of this message
    `message` - the string message to be printed to the log

### printCS

    public final void printCS(LogChannel channel,
                              int logLevel,
                              java.lang.Object[] message)

  This method will call all the log objects to store the message, if they want to.

  Parameters:
    `channel` -
    `logLevel` - the logLevel of this message
    `message` - the string message to be printed to the log (comma separated)

### println

    public final void println(LogChannel channel,
                              int logLevel,
                              java.lang.Object[] message)

  This method will call all the log objects to store the message, if they want to.

  Parameters:
    `channel` -
    `logLevel` - the logLevel of this message
    `message` - the string message to be printed to the log

### printlnCS

    public final void printlnCS(LogChannel channel,
                                int logLevel,
                                java.lang.Object[] message)

  This method will call all the log objects to store the message, if they want to.

  Parameters:
    `channel` -
    `logLevel` - the logLevel of this message
    `message` - the string message to be printed to the log (comma separated)

### getInstance

    public static final LogManager getInstance()

  Returns:
    the LogManager's singleton instance.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD