fr.tireme.shared.logging
Class ConsoleLoggingManager

java.lang.Object
  extended by fr.tireme.shared.logging.ConsoleLoggingManager

public class ConsoleLoggingManager
extends java.lang.Object

Enables to log console messages on a stream and then, as soon as needed, to output it in a JTextArea object.

Since:
21 mars 2004
Author:
pierre

Field Summary
static java.util.logging.Logger cons
          The console logger
 
Constructor Summary
ConsoleLoggingManager()
          Constructor to be used with toString.
ConsoleLoggingManager(javax.swing.JTextArea textLogArea_)
          Constructor defining where the output needs to be sent (to be used with dumpInTextLog)
 
Method Summary
 void dumpInTextLog()
          Dump all stored informations in a textLogArea.
 java.util.logging.Logger getConsole()
          Enables to get the logger in order to write messages.
 java.util.logging.Handler getHandler()
          Enables to get the logger in order to write messages.
 void newConsole()
          Remove the previous stored stream and creates a noew one.
 java.lang.String toString()
          Dump all stored informations in a string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cons

public static java.util.logging.Logger cons
The console logger

Constructor Detail

ConsoleLoggingManager

public ConsoleLoggingManager(javax.swing.JTextArea textLogArea_)
Constructor defining where the output needs to be sent (to be used with dumpInTextLog)

Parameters:
textLogArea_ - where to store messages in the interface

ConsoleLoggingManager

public ConsoleLoggingManager()
Constructor to be used with toString.

Method Detail

newConsole

public void newConsole()
Remove the previous stored stream and creates a noew one.


getConsole

public java.util.logging.Logger getConsole()
Enables to get the logger in order to write messages.

Returns:
The console value

getHandler

public java.util.logging.Handler getHandler()
Enables to get the logger in order to write messages.

Returns:
The handler value

dumpInTextLog

public void dumpInTextLog()
                   throws Xml2outputExcept
Dump all stored informations in a textLogArea. The stream is after that emptied.

Throws:
Xml2outputExcept

toString

public java.lang.String toString()
Dump all stored informations in a string. The stream is after that emptied.

Overrides:
toString in class java.lang.Object
Returns:
the accumulated string information