Package marauroa.common
Class Log4J
java.lang.Object
marauroa.common.Log4J
This is a convenience class for initializing log4j
Please when using Log4j follow the next rules:
- debug just debug info that may be need to find a bug.
- info is just important information that we should be aware to spot behaviors on application.
- warn is a problem that application will handle itself
- error is a big problem on the application that it can't handle.
- fatal is such a problem that the application will stop.
- Author:
- Matthias Totz
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
Log4J
public Log4J()
-
-
Method Details
-
init
public static void init()initializes log4j with the log4j.properties file. -
init
initializes log4j with a custom properties file.- Parameters:
filename
- log4j.properties
-
getLogger
returns a logger for the given class. Use this function instead ofLogger.getLogger(clazz);
. If the logging mechanism changes it will be done here and not in every class using a logger.- Parameters:
clazz
- the Class requesting a logger- Returns:
- the logger instance
-