[ 
https://issues.apache.org/jira/browse/QPID-8017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16322309#comment-16322309
 ] 

Keith Wall commented on QPID-8017:
----------------------------------

In the end I opted for a simple context variable that forces the BDB module to 
override the level applied to zero or more JUL loggers.  This can be used to 
raise the logging level one one or more JE loggers (say "com.sleepycat.je", or 
"com.sleepycat.je.cleaner.Cleaner" so that their logging hits the 
{{Slf4jLoggingHandler}} and is then subjected to Broker-J's normal rules 
(inclusion rules etc).   After setting the context variable it is necessary to 
restart the the BDB VH and VHNs so that the configuration is picked-up.  
Removing the context variable won't revert the JUL loggers back to their 
original state - a JVM restart is the only sure way.  I did look at several 
alternative mechanisms, but all ended up bring too many complications and what 
is a small benefit. I think this should be good enough for a user wishing to 
debug Broker-J precise interaction with JE.

Separately, I noticed the the JE logs sent to a virtualhost logger will always 
be incomplete.  This is because JE's threads do not carry the virtualhost 
principal so are not eligible to be logged.  If you wish to see a complete JE 
trace, we must log at the Broker level to see the complete story.


> [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-rules-into-JUL-l.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 only
> 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
(v6.4.14#64029)

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

Reply via email to