Details
-
Bug
-
Resolution: Fixed
-
Major
-
1.3.0-beta0
-
None
Description
The sequence number of logging events remains at 0 (zero) even after configuring a SequenceNumberGenerator in the LoggerContext.
I tried to configure a sequence number generator in the logback.xml configuration file as follows:
<configuration> <sequenceNumberGenerator class="ch.qos.logback.core.spi.BasicSequenceNumberGenerator"/> ... </configuration>
Although this configuration is accepted without error/warning, a call to LoggerContext#getSequenceGenerator() at runtime always returns null.
After some investigations it appears that LoggerContext#getSequenceNumber() is hardcoded to always return null (see here):
public SequenceNumberGenerator getSequenceNumberGenerator() { return null; }
Also LoggerContext extends ContextBase which also maintains a reference to a SequenceNumberGenerator together with the associated setter and getter methods.
Looks like there is some confusion about which class should own the generator...
Attachments
Issue Links
- links to