qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Rudyy (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (QPID-8017) [Broker-J] [BDB] JE log events written at JUL level FINE and below not included in the log produced by a BrokerLogger
Date Fri, 08 Dec 2017 09:44:00 GMT

     [ https://issues.apache.org/jira/browse/QPID-8017?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Alex Rudyy updated QPID-8017:
    Attachment: 0001-QPID-8017-Broker-J-Propagate-logger-rule-log-levels-.patch

I attached a patch with changes allowing to propagate logger rules into JUL. I think the patch
should work as it is. Though, we have another small issue in {{org.apache.qpid.server.store.berkeleydb.logging.Slf4jLoggingHandler}}.
I did not realize that we  are substituting the log levels of the log records coming from
        Map<Level, MappedLevel> map = new HashMap<>();
        map.put(Level.SEVERE, ERROR);
        map.put(Level.WARNING, WARN);
        //Note that INFO comes out at DEBUG level as the BDB logging at INFO seems to be more
of a DEBUG nature
        map.put(Level.INFO, DEBUG);
        map.put(Level.CONFIG, DEBUG);
        map.put(Level.FINE, TRACE);
        map.put(Level.FINER, TRACE);
        map.put(Level.FINEST, TRACE);
        map.put(Level.ALL, TRACE);

        LEVEL_MAP = Collections.unmodifiableMap(map);
As result, adding a rule {{com.sleepycat.je.*}} enabling {{INFO}} log level does not bring
the desired effect, as {{Slf4jLoggingHandler}} would be logging je {{INFO}} logs with {{DEBUG}}
log level but that is not enabled:) More over, enabling log level {{ALL}} for {{com.sleepycat.je.*}}
would make all JE logs to be logged with {{TRACE}} log level regardless of the original log
level set by JE. It seems more work is required in  {{Slf4jLoggingHandler}}. I would remove
log level mapping and instead add the logger rule for {{com.sleepycat.je.*}} enabling {{WARN}}
log level by default. I am pausing this work until we agree on the changes  required to be
made in  {{Slf4jLoggingHandler}} and whether they should be made as part of {{7.0.1}}.

> [Broker-J] [BDB]  JE log events written at JUL level FINE and below not included in the
log produced by a BrokerLogger
> ----------------------------------------------------------------------------------------------------------------------
>                 Key: QPID-8017
>                 URL: https://issues.apache.org/jira/browse/QPID-8017
>             Project: Qpid
>          Issue Type: Bug
>          Components: Broker-J
>    Affects Versions: qpid-java-6.1, qpid-java-broker-7.0.0
>            Reporter: Keith Wall
>            Priority: Minor
>             Fix For: qpid-java-broker-7.0.1
>         Attachments: 0001-QPID-8017-Broker-J-Propagate-logger-rule-log-levels-.patch
> Reproduction:
> * Add {{NameAndLevel}} logger inclusion rule BrokerLogger {{file}} for source {{com.sleepycat.je.*}}
with Level.ALL
> * Add a BDB HA VHN/VHN
> * Expected behaviour:  verbose logging from JE.  Actual behaviour:  moderate logging
> For instance, JE writes the following message at {{FINE}} which should be logged by the
handler as {{TRACE}}  but it is absent.
> {noformat}
> 2017-11-07 10:42:15,467 TRACE [Cleaner-1] (c.s.j.c.UtilizationCalculator) - [default]
Clean file none: predicted min util is below minUtilization, current util min: 20 max: 20,
predicted util min: 20 max: 20
> {noformat}
> There is a workaround for the functional problem, albeit a restart is required and the
ability to change the process's system properties.  Use the normal JUL system property {{java.util.logging.config.file}}.
 Set this to the location of a logging.properties file with the {{com.sleepycat.je}} logger
set to the desired level.  Once the JVM is restarted, the Broker's log files will include
the logging.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org

View raw message