com.jaxfront.core.log
Class LogRegistry

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

public class LogRegistry
extends java.lang.Object
implements Logger

This is the main class to log a message. First it tries to create an instance of the Log4J logger. If it failes, a dummy logger will be used.

Version:
1.60
See Also:
LogRegistry, DummyLogRegistry

Method Summary
 void error(java.lang.Class aClass, java.lang.Exception e)
          Log the exception with log level error to the coosen logger
 void error(java.lang.Class aClass, java.lang.String message)
          Log the message with log level error to the coosen logger
 void fatal(java.lang.Class aClass, java.lang.Exception e)
          Log the exception with log level fatal to the coosen logger
 void fatal(java.lang.Class aClass, java.lang.String message)
          Log the message with log level fatal
static LogRegistry getInstance()
          Returns the instance of this class
static org.apache.log4j.Logger getJDBCLogger()
           
 java.lang.String getLogFileUrl()
           
 Logger getLogger()
          Returns the choosen logger that has been build.
 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 to the coosen logger
 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 to the choosen logger
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setLogFileUrl

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

getLogFileUrl

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

setLogLevels

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

error

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

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 to the coosen logger

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 to the coosen logger

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

getInstance

public static LogRegistry getInstance()
Returns the instance of this class

Returns:
an instance of this class

getLogger

public Logger getLogger()
Returns the choosen logger that has been build.

Returns:
the choosen 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

log

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

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

warn

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

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

isDebug

public boolean isDebug()

getJDBCLogger

public static org.apache.log4j.Logger getJDBCLogger()