[logback-dev] [JIRA] Commented: (LBCLASSIC-273) Status messages of StatusManager are not cleared upon call to LoggerContext.reset()

Ceki Gulcu (JIRA) noreply-jira at qos.ch
Fri Jul 1 18:47:51 CEST 2011

    [ http://jira.qos.ch/browse/LBCLASSIC-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12052#action_12052 ] 

Ceki Gulcu commented on LBCLASSIC-273:

Partially fixed in [1]. ConfigurationAction will now print status messages having occurred during the current invocation of Joran. I have removed the getLevel method from StatusManager since its meaning was ambiguous.

You would need to adapt your code above according to the following template:

JoranConfigurator configurator = new JoranConfigurator();
long threshold = System.currentMillis();  // new
try {
} catch(...) { ... }

StatusChecker sc = new StatusChecker(loggerContext);
if(statusChecker.getHighestLevel(threshold) > Status.INFO) {
  List<Status> statusList = StatusUtil.filterStatusListByTimeThreshold(sm.getCopyOfStatusList(), threshold); 
  for(Status current : statusList) { ... } 

Let me know if these changes work for you.

[1] http://github.com/ceki/logback/commit/6e98d1bb0c1c728a

> Status messages of StatusManager are not cleared upon call to LoggerContext.reset()
> -----------------------------------------------------------------------------------
>                 Key: LBCLASSIC-273
>                 URL: http://jira.qos.ch/browse/LBCLASSIC-273
>             Project: logback-classic
>          Issue Type: Bug
>    Affects Versions: 0.9.28
>            Reporter: Joern Huxhorn
>            Assignee: Logback dev list
> See https://github.com/ceki/logback/pull/15

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the logback-dev mailing list