BackupEnabledDailyRollingFileAppender.java 文件源码

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

项目:utils4j 作者:
public void activateOptions()
{
    super.activateOptions();
    if (datePattern != null && fileName != null)
    {
        now.setTime(System.currentTimeMillis());
        sdf = new SimpleDateFormat(datePattern);
        int type = computeCheckPeriod();
        printPeriodicity(type);
        rc.setType(type);
        File file = new File(fileName);
        scheduledFilename = fileName + sdf.format(new Date(file.lastModified()));

    }
    else
    {
        LogLog.error("Either File or DatePattern options are not set for appender [" + name + "].");
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号