Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: konspire/common/log/UniqueDatedFileLoggingMechanism.java


1   package konspire.common.log;
2   
3   import java.io.*;
4   import java.util.*;
5   import java.text.*;
6   
7   /**
8    * This logging mechanism adds today's date to the log file name, and also
9    * rolls logging over to a new file when dates change (the first new string
10   * logged on a new date causes the current log file to close and a new log
11   * file to be opened with today's date).
12   *
13   * @author Todd Lauinger
14   * @version $Revision: 1.3 $
15   */
16  
17  public class UniqueDatedFileLoggingMechanism extends UniqueFileLoggingMechanism {
18  
19    // Unique mechanisms require new instances for each log!
20    public static AbstractLoggingMechanism getInstance() {
21  
22      return new UniqueDatedFileLoggingMechanism();
23    }
24  
25      // This is a dated log and needs to have a date appended to the
26      // file name and must be rolled over when the current date changes.
27      protected boolean isDatedLog() {
28          return true;
29      }
30  
31  }
32