SecureLog.java 文件源码

java
阅读 19 收藏 0 点赞 0 评论 0

项目:build-management 作者:
/**
 * 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);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号