LogRecord.getMillis() is no longer deprecated. LogRecord.setInstant() check that the instant millis can fit in a long millisecond-since-epoch.
Reviewed-by: lancea, rriggs, smarks
Two new updateConfiguration methods have been added to LogManager: call updateConfiguration to update a configuration *after* the LogManager is initialized.
Reviewed-by: mchung
NamedLoggers is now a ConcurrentHashMap. findLogger is updated to take benefit of the change.
Co-authored-by: Peter Levart <peter.levart@gmail.com>
Reviewed-by: dholmes, lancea, martin, mchung, plevart
LogManager.readConfiguration will wrap the IllegalArgumentException thrown by Properties.load inside an IOException.
Reviewed-by: lancea, mchung, rriggs
J.u.logging uses j.t.Instant to store LogRecord time stamps. XMLFormatter format is updated to allow for a new optional <nanos> element containing a nano second adjustment. SimpleFormatter passes a ZonedDateTime object to String.format. LogRecord getMillis/setMillis are deprecated, replaced by getInstant/setInstant.
Co-authored-by: Peter Levart <peter.levart@gmail.com>
Reviewed-by: scolebourne, plevart, rriggs
Loggers which have been configured with a handler in the configuration file will be retained by the LogManager until reset() is called. A new configuration property is added to explicitely turn the fix off.
Reviewed-by: mchung
FileHandler now uses 'long' for limit and MeteredStream.written. It also reads a long for limit from the configuration, and has a new constructor allowing to pass a 'long' for limit.
Reviewed-by: alanb, igerasim, mchung
NPE may be thrown when Path.getParentPath() returns null. The fix is to call Path.getAbsolutePath().getParentPath() when Path.getParentPath() returns null.
Reviewed-by: alanb
Added two new methods to LogManager (addConfigurationListener/removeConfigurationListener) which provide an equivalent functionality with no ties to java.beans.
Reviewed-by: alanb, mchung, plevart, psandoz
CheckZombieLockTest and CheckLockLocationTest should work with different temporary log directories so that they can be run concurrently. This fix changes the name of the log directory used by CheckZombieLockTest.
Reviewed-by: mchung
This is due to a race condition in the test where one GetRB thread can receive a stale LogRecord comming from another GetRB thread.
Reviewed-by: dholmes
In some circumstances j.u.l.FileHandler can leave zombie lock files on the file system. The fix lets FileHandler reuse such zombie lock files when it sees them - as it used to do in version 1.7 of the JDK.
Reviewed-by: alanb
The test was not keeping any strong reference on the loggers it created allowing for them to be garbage collected too early.
Reviewed-by: mchung, chegar
8029781: Theoretical data race on java.util.logging.Handler.sealed
Use privileged actions instead of racy boolean field to elevate privilege when constructing logging handlers
Reviewed-by: mchung, dfuchs
This is a test bug - loggers held in local variables can be arbitrarily gc'ed if that variable is no longer used. The fix makes sure that the loggers won't be arbitrarily gc'ed before the test is complete.
Reviewed-by: mchung
This test has been seen failing on Solaris 10, presumably because it was run as root. The fix will skip the non-writable case if it can't make a non-writable dir.
Reviewed-by: mchung