Package com.logicaldoc.util.config
Class LoggingConfigurator
java.lang.Object
com.logicaldoc.util.config.LoggingConfigurator
Utility class for manipulating log4j.xml file
- Author:
- Michael Scholz, Marco Meschieri
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addHtmlAppender
(String name) void
void
addTextAppender
(String name) Same asgetFile(String, boolean)
This method selects a filepath of an appender.This method selects all the log filesgetProperty
(String name) void
setLogsRoot
(String rootPath) Sets a common path for all file appenders.boolean
write()
-
Constructor Details
-
LoggingConfigurator
public LoggingConfigurator()
-
-
Method Details
-
getProperty
-
getLoggingFiles
This method selects all the log files- Returns:
- collection of the log file paths
-
getFile
Same asgetFile(String, boolean)
- Parameters:
appender
- name of the appender- Returns:
- the path of the log file
-
getFile
This method selects a filepath of an appender.- Parameters:
appender
- The appender namereplaceVariables
- If true all variables(${var}) in the file path will be substituted- Returns:
- The log file path
-
addTextAppender
-
addHtmlAppender
-
addLogger
-
setLogsRoot
Sets a common path for all file appenders.- Parameters:
rootPath
- The path to be used
-
getLogsRoot
-
write
public boolean write()
-