com.jaxfront.core.log
Class Log4JLogRegistry

java.lang.Object
  extended by com.jaxfront.core.log.Log4JLogRegistry
All Implemented Interfaces:
Logger

public class Log4JLogRegistry
extends java.lang.Object
implements Logger

This class logs all message with Log4J. With the property file of Log4J the message could be loged in a file or to the console. This class delegates the messages to Log4J.


Field Summary
static java.lang.String ERROR
           
static java.lang.String FATAL
           
static java.lang.String INFO
           
static java.lang.String LOG
           
static java.lang.String WARN
           
 
Constructor Summary
Log4JLogRegistry()
          Creates an instance of a Log4J Logger.
 
Method Summary
 void error(java.lang.Class aClass, java.lang.Exception e)
          Log the exception with log level error
 void error(java.lang.Class aClass, java.lang.String message)
          Log the message with log level error
 void fatal(java.lang.Class aClass, java.lang.Exception e)
          Log the exception with log level fatal
 void fatal(java.lang.Class aClass, java.lang.String message)
          Log the message with log level fatal
 java.lang.String getLogFileUrl()
           
 void info(java.lang.Class aClass, java.lang.String message)
          Log the message with log level info
 boolean isDebug()
           
 void log(java.lang.Class aClass, java.lang.String message)
          Log the message with log level log
 boolean logErrors()
           
 boolean logFatals()
           
 boolean logInfos()
           
 boolean logLogs()
           
 boolean logWarnings()
           
 void setDebug(boolean isDebug)
           
 void setLogFileUrl(java.lang.String url)
           
 void setLogLevels(java.lang.String[] logLevels)
           
 void warn(java.lang.Class aClass, java.lang.String message)
          Log the message with log level warn
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERROR

public static final java.lang.String ERROR
See Also:
Constant Field Values

FATAL

public static final java.lang.String FATAL
See Also:
Constant Field Values

INFO

public static final java.lang.String INFO
See Also:
Constant Field Values

LOG

public static final java.lang.String LOG
See Also:
Constant Field Values

WARN

public static final java.lang.String WARN
See Also:
Constant Field Values
Constructor Detail

Log4JLogRegistry

public Log4JLogRegistry()
Creates an instance of a Log4J Logger.

Method Detail

error

public void error(java.lang.Class aClass,
                  java.lang.Exception e)
Log the exception with log level error

Specified by:
error in interface Logger
Parameters:
aClass - the class where the message comes
e - the exception to log

error

public void error(java.lang.Class aClass,
                  java.lang.String message)
Log the message with log level error

Specified by:
error in interface Logger
Parameters:
aClass - the class where the message comes
message - the message to log

fatal

public void fatal(java.lang.Class aClass,
                  java.lang.Exception e)
Log the exception with log level fatal

Specified by:
fatal in interface Logger
Parameters:
aClass - the class where the message comes
e - the exception to log

fatal

public void fatal(java.lang.Class aClass,
                  java.lang.String message)
Log the message with log level fatal

Specified by:
fatal in interface Logger
Parameters:
aClass - the class where the message comes
message - the message to log

getLogFileUrl

public java.lang.String getLogFileUrl()
Specified by:
getLogFileUrl in interface Logger

info

public void info(java.lang.Class aClass,
                 java.lang.String message)
Log the message with log level info

Specified by:
info in interface Logger
Parameters:
aClass - the class where the message comes
message - the message to log

isDebug

public boolean isDebug()

log

public void log(java.lang.Class aClass,
                java.lang.String message)
Log the message with log level log

Specified by:
log in interface Logger
Parameters:
aClass - the class where the message comes
message - the message to log

logErrors

public boolean logErrors()
Specified by:
logErrors in interface Logger

logFatals

public boolean logFatals()
Specified by:
logFatals in interface Logger

logInfos

public boolean logInfos()
Specified by:
logInfos in interface Logger

logLogs

public boolean logLogs()
Specified by:
logLogs in interface Logger

logWarnings

public boolean logWarnings()
Specified by:
logWarnings in interface Logger

setDebug

public void setDebug(boolean isDebug)

setLogFileUrl

public void setLogFileUrl(java.lang.String url)
Specified by:
setLogFileUrl in interface Logger

setLogLevels

public void setLogLevels(java.lang.String[] logLevels)
Specified by:
setLogLevels in interface Logger

warn

public void warn(java.lang.Class aClass,
                 java.lang.String message)
Log the message with log level warn

Specified by:
warn in interface Logger
Parameters:
aClass - the class where the message comes
message - the message to log