Package com.logicaldoc.util.config
Class LoggingConfigurator
- java.lang.Object
-
- com.logicaldoc.util.config.LoggingConfigurator
-
public class LoggingConfigurator extends Object
Utility class for manipulating log4j.xml file- Author:
- Michael Scholz, Marco Meschieri
-
-
Constructor Summary
Constructors Constructor Description LoggingConfigurator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addHtmlAppender(String name)
void
addLogger(String name, String[] appenders)
void
addTextAppender(String name)
String
getFile(String appender)
Same asgetFile(String, boolean)
String
getFile(String appender, boolean replaceVariables)
This method selects a filepath of an appender.Collection<String>
getLoggingFiles()
This method selects all the log filesString
getLogsRoot()
String
getProperty(String name)
void
setLogsRoot(String rootPath)
Sets a common path for all file appenders.boolean
write()
-
-
-
Method Detail
-
getLoggingFiles
public Collection<String> getLoggingFiles()
This method selects all the log files- Returns:
- collection of the log file paths
-
getFile
public String getFile(String appender)
Same asgetFile(String, boolean)
- Parameters:
appender
- name of the appender- Returns:
- the path of the log file
-
getFile
public String getFile(String appender, boolean replaceVariables)
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
public void addTextAppender(String name)
-
addHtmlAppender
public void addHtmlAppender(String name)
-
setLogsRoot
public void setLogsRoot(String rootPath)
Sets a common path for all file appenders.- Parameters:
rootPath
- The path to be used
-
getLogsRoot
public String getLogsRoot()
-
write
public boolean write()
-
-