Resolved two incompatibilities with JDK 1.3
This commit is contained in:
parent
7bc5876c96
commit
186f434418
1 changed files with 3 additions and 3 deletions
|
@ -82,11 +82,11 @@ public final class Logger {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (logfile.exists () && logfile.lastModified () < lastMidnight ()) {
|
if (logfile.exists () && logfile.lastModified () < lastMidnight ()) {
|
||||||
// rotate if a log file exists and is NOT from today
|
// rotate if a log file exists and is NOT from today
|
||||||
rotateLogFile ();
|
rotateLogFile ();
|
||||||
} else {
|
} else {
|
||||||
// create a new log file, append to an existing file
|
// create a new log file, append to an existing file
|
||||||
writer = new PrintWriter (new FileWriter (logfile, true), false);
|
writer = new PrintWriter (new FileWriter (logfile.getAbsolutePath(), true), false);
|
||||||
}
|
}
|
||||||
} catch (IOException iox) {
|
} catch (IOException iox) {
|
||||||
System.err.println ("Error creating log "+canonicalName+": "+iox);
|
System.err.println ("Error creating log "+canonicalName+": "+iox);
|
||||||
|
@ -371,7 +371,7 @@ public final class Logger {
|
||||||
cal.set (Calendar.SECOND, 1);
|
cal.set (Calendar.SECOND, 1);
|
||||||
// for testing, rotate the logs every minute:
|
// for testing, rotate the logs every minute:
|
||||||
// cal.set (Calendar.MINUTE, 1 + cal.get(Calendar.MINUTE));
|
// cal.set (Calendar.MINUTE, 1 + cal.get(Calendar.MINUTE));
|
||||||
return cal.getTimeInMillis ();
|
return cal.getTime().getTime ();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static long lastMidnight () {
|
public static long lastMidnight () {
|
||||||
|
|
Loading…
Add table
Reference in a new issue