FileHandler.java 文件源码

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

项目:lams 作者:
/**
 * Open the new log file for the date specified by <code>date</code>.
 */
private void open() {

    // Create the directory if necessary
    File dir = new File(directory);
    dir.mkdirs();

    // Open the current log file
    try {
        String pathname = dir.getAbsolutePath() + File.separator +
            prefix + date + suffix;
        writer = new PrintWriter(new FileWriter(pathname, true), true);
        writer.write(getFormatter().getHead(this));
    } catch (Exception e) {
        reportError(null, e, ErrorManager.OPEN_FAILURE);
        writer = null;
    }

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号