Bug 1040961 - Filter-spec on root-logger is not propagated into child handlers
Summary: Filter-spec on root-logger is not propagated into child handlers
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Logging
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: EAP 6.3.0
Assignee: James Perkins
QA Contact: Nikoleta Hlavickova
Russell Dickenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-12 12:24 UTC by Petr Kremensky
Modified: 2014-08-14 12:43 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-12 18:47:06 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1130150 0 unspecified CLOSED In some scenarios filter-spec defined on logger is not inherited by handlers 2021-02-22 00:41:40 UTC

Internal Links: 1130150

Description Petr Kremensky 2013-12-12 12:24:52 UTC
Description of problem:
 filter-spec attribute defined on root-logger is not used for child handlers (OOB: CONSOLE and FILE).

Version-Release number of selected component (if applicable):
 EAP 6.2.0.GA

How reproducible:
 Always

Steps to Reproduce:
 1. Start out-of-box standalone and connect to cli.
 2. Run: 
/subsystem=logging/root-logger=ROOT:write-attribute(name=filter-spec, value=substituteAll("JBAS"\,"XXXXX"))
 3. Reload a server

Actual results:
 Neither console handler nor file handler take over filter-spec configuration from root logger.

Expected results:
 User is either not allowed to define filter spec attribute on root logger, or it is propagated into all handlers registered under root logger.

Comment 1 James Perkins 2013-12-12 18:47:06 UTC
This is by design currently. There is an upstream log manager issue, https://issues.jboss.org/browse/LOGMGR-45, to add support for this, but at this point filters on loggers are not inherited. The main reason being that java.util.logging does not do this either.

It's best to put filters on the handlers themselves. While this would require a filter on each handler, it's really the best way to do it.

Comment 2 Petr Kremensky 2013-12-13 06:04:31 UTC
Thanks for clarification James, I'll fill the BZ to mention this in Documentation.


Note You need to log in before you can comment on or make changes to this bug.