-
1. Re: Problems with a filter-spec in Wildfly 15
davegleeds Oct 29, 2019 12:12 PM (in response to davegleeds)I've now installed Wildfly 17 and the problem persists
-
2. Re: Problems with a filter-spec in Wildfly 15
jamezp Oct 29, 2019 5:19 PM (in response to davegleeds)By default loggers don't inherit filters. Any filter-spec defined on a logger would only filter log messages that are logged directly to the logger. There is an open JIRA, WFCORE-3462, to expose the behavior of inheriting filters on a logger.
This means that currently it's best to place the filter on a handler or directly on the logger that logs message. However in WildFly 18 you can use a custom filter.
--
James R. Perkins
-
3. Re: Problems with a filter-spec in Wildfly 15
davegleeds Oct 30, 2019 5:12 AM (in response to jamezp)Thanks for the answer James but I'm still a little confused.
When you mention a filter spec being defined on a logger, I presume that's not the same as a filter-spec on a category?
I understand that a filter defined on a root logger is not inherited by other loggers but, when I create a category, doesn't that create a new logger?
Sorry if this is basic 101 stuff I should know.
At least I know now to add the filter-spec on the handler and that works fine for me.
-
4. Re: Problems with a filter-spec in Wildfly 15
jamezp Oct 30, 2019 6:11 PM (in response to davegleeds)Hi Dave,
A category and a logger are really the same thing. The category is essentially the name for the logger, for example Logger.getLogger("org.jboss.example") has a name, category, of "org.jboss.example". As long as the filter-spec is defined on the specific logger you want filtered messages on then it should work.
--
James R. Perkins