LoggerLog4j¶
-
public class
LoggerLog4j
extends PersistentComponent implements hk.hku.cecid.piazza.commons.util.Logger¶ LoggerLog4j is an implementation of a Logger and is backed by a Log4j logger.
Author: Hugo Y. K. Lam See also:
org.apache.log4j.Logger
Constructors¶
LoggerLog4j¶
LoggerLog4j¶
LoggerLog4j¶
-
public
LoggerLog4j
(String name, URL url)¶ Creates a new instance of LoggerLog4j.
Parameters: - name – the logger category name. null if the name should be looked up dynamically in logging.
- url – the url of the configuration file.
Throws: - UtilitiesException – if the configuration could not be loaded from the specified url.
Methods¶
debug¶
debug¶
error¶
error¶
fatal¶
fatal¶
info¶
info¶
init¶
-
protected void
init
()¶ Initializes this logger and sets a default logger if specified.
Throws: - Exception – if error occurred in initialization.
See also:
hk.hku.cecid.piazza.commons.module.Component.init()
isDebugEnabled¶
-
public boolean
isDebugEnabled
()¶ Checks if the logger itself is in debug mode.
Returns: true if the logger itself is in debug mode.
loading¶
-
protected void
loading
(URL url)¶ Loads the configuration from the specified url location. A DOM configuration will be triggered if the url ends with ”.xml”.
Parameters: - url – the url of the configuration source.
Throws: - Exception – if the operation is unsuccessful.
See also:
hk.hku.cecid.piazza.commons.module.PersistentComponent.loading(java.net.URL)