erland.util
Class Log

java.lang.Object
  extended by erland.util.Log

Deprecated. You should use commons-logging classes instead

public abstract class Log
extends Object

Logging class which makes it possible to activate/deactivate logging

Author:
Erland Isaksson

Field Summary
static int DEBUG
          Deprecated. Constant for DEBUG logging level
static int ERROR
          Deprecated. Constant for ERROR logging level
static int INFORMATION
          Deprecated. Constant for INFORMATION logging level
static int WARNING
          Deprecated. Constant for WARNING logging level
 
Constructor Summary
Log()
          Deprecated.  
 
Method Summary
static boolean isEnabled(Object obj)
          Deprecated. Checks if logging is enabled on the specified object.
static boolean isEnabled(Object obj, int level)
          Deprecated. Checks if logging is enabled on the specified object.
static void println(Object obj, Object logObject)
          Deprecated. Log a object if logging is enabled or just return without doing anything if logging is disabled
static void println(Object obj, Object logObject, int level)
          Deprecated. Log a object if logging is enabled or just return without doing anything if logging is disabled
static void println(Object obj, String logString)
          Deprecated. Log a text string if logging is enabled or just return without doing anything if logging is disabled
static void println(Object obj, String logString, int level)
          Deprecated. Log a text string if logging is enabled or just return without doing anything if logging is disabled
static void setLog(boolean active)
          Deprecated. Enabled or disable logging everywhere
static void setLog(String logFile)
          Deprecated. Enabled or disable logging by using a configuration string
static void setLogConfig(ParameterValueStorageInterface config)
          Deprecated. Enabled or disable logging by using a configuration string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

public static int DEBUG
Deprecated. 
Constant for DEBUG logging level


INFORMATION

public static int INFORMATION
Deprecated. 
Constant for INFORMATION logging level


WARNING

public static int WARNING
Deprecated. 
Constant for WARNING logging level


ERROR

public static int ERROR
Deprecated. 
Constant for ERROR logging level

Constructor Detail

Log

public Log()
Deprecated. 
Method Detail

setLog

public static void setLog(boolean active)
Deprecated. 
Enabled or disable logging everywhere

Parameters:
active - Indicates if logging should be enable

isEnabled

public static boolean isEnabled(Object obj)
Deprecated. 
Checks if logging is enabled on the specified object. This method can be used if you want to avoid preparing a log string if logging is not enabled

Parameters:
obj - Object to check if logging is enabled on

isEnabled

public static boolean isEnabled(Object obj,
                                int level)
Deprecated. 
Checks if logging is enabled on the specified object. This method can be used if you want to avoid preparing a log string if logging is not enabled

Parameters:
obj - Object to check if logging is enabled on
level - The logging level to check

setLog

public static void setLog(String logFile)
Deprecated. 
Enabled or disable logging by using a configuration string

Parameters:
logFile - Configuration file with instruction of which parts that should be logged. A file like below would enable logging in erland.util.XMLNode and erland.util.ParameterStorage classes:

<log>
<logitem1>erland.util.XMLNode</logitem1>
<logitem2>erland.util.ParameterStorage</logitem2>
<logitemlevel2>4</logitemlevel2>
</log>

setLogConfig

public static void setLogConfig(ParameterValueStorageInterface config)
Deprecated. 
Enabled or disable logging by using a configuration string

Parameters:
config - Configuration storage with instruction of which parts that should be logged. A string like below would enable logging in erland.util.XMLNode and erland.util.ParameterStorage classes:

<log>
<logitem1>erland.util.XMLNode</logitem1>
<logitem2>erland.util.ParameterStorage</logitem2>
<logitemlevel2>4</logitemlevel2>
</log>

println

public static void println(Object obj,
                           String logString)
Deprecated. 
Log a text string if logging is enabled or just return without doing anything if logging is disabled

Parameters:
obj - The object in which the logging occurred
logString - The string that should be logged

println

public static void println(Object obj,
                           String logString,
                           int level)
Deprecated. 
Log a text string if logging is enabled or just return without doing anything if logging is disabled

Parameters:
obj - The object in which the logging occurred
logString - The string that should be logged
level - The log level of this log string

println

public static void println(Object obj,
                           Object logObject)
Deprecated. 
Log a object if logging is enabled or just return without doing anything if logging is disabled

Parameters:
obj - The object in which the logging occurred
logObject - The object that should be logged the toString() method will be called

println

public static void println(Object obj,
                           Object logObject,
                           int level)
Deprecated. 
Log a object if logging is enabled or just return without doing anything if logging is disabled

Parameters:
obj - The object in which the logging occurred
logObject - The object that should be logged the toString() method will be called
level - The log level of this log string


Copyright © 2003-2005 Erland Isaksson. All Rights Reserved.