fr.paris.lutece.portal.service.util
Class AppLogService

java.lang.Object
  extended by fr.paris.lutece.portal.service.util.AppLogService

public final class AppLogService
extends java.lang.Object

This class provides writing services in the application logs files


Method Summary
static void debug(java.lang.Object objToLog)
          Log a message object with the DEBUG level.
static void debug(java.lang.String strLogger, java.lang.Object objToLog)
          Log a message object with the DEBUG level.
static void error(java.lang.Object objToLog)
          Log a message object with the ERROR Level.
static void error(java.lang.Object message, java.lang.Throwable t)
          Log a message object with the ERROR level including the stack trace of the Throwable t passed as parameter.
static void info(java.lang.Object objToLog)
          Log a message object with the INFO Level in application.log
static void init(java.lang.String strConfigPath, java.lang.String strConfigFile)
          initializes the errors log file and the application log file
static boolean isDebugEnabled()
          Tells if the logger accepts debug messages.
static boolean isDebugEnabled(java.lang.String strLogger)
          Tells if the logger accepts debug messages.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

init

public static void init(java.lang.String strConfigPath,
                        java.lang.String strConfigFile)
initializes the errors log file and the application log file

Parameters:
strConfigPath - The strConfigPath
strConfigFile - The strConfigFile

isDebugEnabled

public static boolean isDebugEnabled()
Tells if the logger accepts debug messages. If not it prevents to build consuming messages that will be ignored.

Returns:
True if the logger accepts debug messages, otherwise false.

debug

public static void debug(java.lang.Object objToLog)
Log a message object with the DEBUG level. It is logged in application.log

Parameters:
objToLog - the message object to log

isDebugEnabled

public static boolean isDebugEnabled(java.lang.String strLogger)
Tells if the logger accepts debug messages. If not it prevents to build consuming messages that will be ignored.

Parameters:
strLogger - The Logger name
Returns:
True if the logger accepts debug messages, otherwise false.

debug

public static void debug(java.lang.String strLogger,
                         java.lang.Object objToLog)
Log a message object with the DEBUG level. It is logged in application.log

Parameters:
strLogger - The Logger name
objToLog - the message object to log

error

public static void error(java.lang.Object objToLog)
Log a message object with the ERROR Level. It is logged in error.log

Parameters:
objToLog - the message object to log

error

public static void error(java.lang.Object message,
                         java.lang.Throwable t)
Log a message object with the ERROR level including the stack trace of the Throwable t passed as parameter. It is logged in error.log

Parameters:
message - the message object to log
t - the exception to log, including its stack trace

info

public static void info(java.lang.Object objToLog)
Log a message object with the INFO Level in application.log

Parameters:
objToLog - the message object to log


Copyright © 2010 Mairie de Paris. All Rights Reserved.