/**
* Constructs a log which writes log entries to the given log file.
*
* @param title Identifies the log entries
* @param logfile Location of the log file
*/
public SecureLog(String title, String logfile) throws IOException {
defaultLog = new FileOutputStream(logfile);
logAppender = new DailyRollingFileAppender(defaultLayout, logfile, rotationInterval);
logAppender.setName(defaultLogName);
// Configure the logging options
//logRoot = new SecureCategory(title);
logRoot = (SecureCategory)SecureCategory.getLogger(title);
logRoot.addAppender(logAppender);
setLogLevel(DEBUG);
logEntry(this, DEBUG,
"Constructing " + title + " log. Initial log level is DEBUG. " +
"Output will be sent to: " + logfile);
}
SecureLog.java 文件源码
java
阅读 18
收藏 0
点赞 0
评论 0
项目:build-management
作者:
评论列表
文章目录