org.objectweb.telosys.common
Class LogWriter

java.lang.Object
  extended byorg.objectweb.telosys.common.LogWriter

public final class LogWriter
extends java.lang.Object


Field Summary
static int ERROR
           
static int INFO
           
static int TRACE
           
 
Constructor Summary
LogWriter()
          Constructs a new instance with "CONSOLE" as the only output for all kinds of messages
LogWriter(java.util.Properties prop)
          Constructs a new instance using the given properties to define the outputs
LogWriter(java.lang.String sFileName)
          Constructs a new instance using a properties file to define the outputs
 
Method Summary
 void error(java.lang.String sMsg)
          Prints an "ERROR" message on all the "error" outputs
 void error(java.lang.String sClassName, java.lang.String sMsg)
          Prints an "ERROR" message on all the "error" outputs
 void exeptionReport(java.lang.Throwable ex)
          Reports an exception (including causes and stack trace) on all the "error" outputs
 void info(java.lang.String sMsg)
          Prints an "info" message on all the "info" outputs
 void info(java.lang.String sClassName, java.lang.String sMsg)
          Prints an "info" message on all the "info" outputs
 void showConfig(java.io.PrintStream out)
          Prints the current outputs configuration
 void trace(java.lang.String sMsg)
          Prints an "Trace" message on all the "trace" outputs
 void trace(java.lang.String sClassName, java.lang.String sMsg)
          Prints an "Trace" message on all the "trace" outputs
 void warn(java.lang.String sMsg)
          Prints a "WARN" message on all the "info" outputs
 void warn(java.lang.String sClassName, java.lang.String sMsg)
          Prints a "WARN" message on all the "info" outputs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INFO

public static final int INFO
See Also:
Constant Field Values

TRACE

public static final int TRACE
See Also:
Constant Field Values

ERROR

public static final int ERROR
See Also:
Constant Field Values
Constructor Detail

LogWriter

public LogWriter(java.lang.String sFileName)
Constructs a new instance using a properties file to define the outputs

Parameters:
sFileName -

LogWriter

public LogWriter(java.util.Properties prop)
Constructs a new instance using the given properties to define the outputs

Parameters:
prop -

LogWriter

public LogWriter()
Constructs a new instance with "CONSOLE" as the only output for all kinds of messages

Method Detail

error

public void error(java.lang.String sClassName,
                  java.lang.String sMsg)
Prints an "ERROR" message on all the "error" outputs

Parameters:
sClassName -
sMsg -

error

public void error(java.lang.String sMsg)
Prints an "ERROR" message on all the "error" outputs

Parameters:
sMsg -

warn

public void warn(java.lang.String sClassName,
                 java.lang.String sMsg)
Prints a "WARN" message on all the "info" outputs

Parameters:
sClassName -
sMsg -

warn

public void warn(java.lang.String sMsg)
Prints a "WARN" message on all the "info" outputs

Parameters:
sMsg -

info

public void info(java.lang.String sClassName,
                 java.lang.String sMsg)
Prints an "info" message on all the "info" outputs

Parameters:
sClassName -
sMsg -

info

public void info(java.lang.String sMsg)
Prints an "info" message on all the "info" outputs

Parameters:
sMsg -

trace

public void trace(java.lang.String sClassName,
                  java.lang.String sMsg)
Prints an "Trace" message on all the "trace" outputs

Parameters:
sClassName -
sMsg -

trace

public void trace(java.lang.String sMsg)
Prints an "Trace" message on all the "trace" outputs

Parameters:
sMsg -

showConfig

public void showConfig(java.io.PrintStream out)
Prints the current outputs configuration

Parameters:
out - where to print the configuration

exeptionReport

public void exeptionReport(java.lang.Throwable ex)
Reports an exception (including causes and stack trace) on all the "error" outputs

Parameters:
ex -