Project

General

Profile

« Previous | Next » 

Revision 7847

Added by Jing Tao over 11 years ago

Change the date format.
Remove the replication part of log4j.

View differences:

metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/event/HazelcastIndexEventLog.java
45 45
    
46 46
    private static final String LASTPROCESSEDDATEFILENAME = "solr-last-proccessed-date";
47 47
    private File lastProcessedDateFile = null;
48
    private SimpleDateFormat format = new SimpleDateFormat("yyMMddHHmmssZ");
48
    private SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
49 49
    
50 50
    /**
51 51
     * Constructor
metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/event/IndexEventFileLog.java
51 51
    private File logFile = null;
52 52
    private File lastProcessedDateFile = null;
53 53
    private long index=1;
54
    private SimpleDateFormat format = new SimpleDateFormat("yyMMddHHmmssZ");
54
    private SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
55 55
    
56 56
    /**
57 57
     * Constructor. Initialize the log file. The log file locates solr.homeDir. 
metacat-index/src/main/resources/log4j.properties
42 42
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
43 43

  
44 44
# define the pattern to be used in the logs... 
45
log4j.appender.stdout.layout.ConversionPattern=knb %d{yyyyMMdd-HH:mm:ss}: [%p]: %m [%c]%n
45
log4j.appender.stdout.layout.ConversionPattern=metacat-index %d{yyyyMMdd-HH:mm:ss}: [%p]: %m [%c]%n
46 46

  
47 47
# %p -> priority level of the event - (e.g. WARN)
48 48
# %m -> message to be printed
......
63 63
#log4j.logger.edu.ucsb.nceas.metacat.dataone.CNodeService=TRACE
64 64
#log4j.logger.edu.ucsb.nceas.metacat.common.query=INFO
65 65

  
66
### LOGGING TO REPLICATION FILE #########################################################
67
log4j.logger.ReplicationLogging=INFO, replication
68
log4j.appender.replication=org.apache.log4j.DailyRollingFileAppender
69
log4j.appender.replication.File=${replication.logfile.name}
70
log4j.appender.replication.DatePattern='.'yyyy-ww
71
log4j.appender.replication.maxFileSize=100000KB
72
log4j.appender.replication.maxBackupIndex=10
73
log4j.appender.replication.threshold=info
74
log4j.appender.replication.layout=org.apache.log4j.PatternLayout
75
log4j.appender.replication.layout.ConversionPattern=knb %d{yyyyMMdd-HH:mm:ss}: [%p]: %m [%c]%n

Also available in: Unified diff