-
1. Re: Logging filter match semantics
jamezp Oct 8, 2013 12:48 PM (in response to mtopolnik)1 of 1 people found this helpfulWhat version of JBoss AS, EAP or WildFly are you using?
Looking at the message it appears that the JBAS011054 message is coming in as a part of the message format. In older versions of the log manager the filters were only executed on the unformatted message. This was changed in 1.4.3.Final and 1.5.1.Final to allow the regex filter to be applied to formatted messages. You might just need to upgrade the jboss-logmanager module.
--
James R. Perkins
-
2. Re: Logging filter match semantics
mtopolnik Oct 8, 2013 4:15 PM (in response to jamezp)I'm using AS 7.1.1.Final and I see it comes with logmanager version 1.2.2.GA. I have proceeded to upgrade logmanager to 1.5.1.Final, with no effect; I upgraded jboss-logging to 3.1.3.GA for good measure, but still no change.
-
3. Re: Logging filter match semantics
jamezp Oct 8, 2013 4:27 PM (in response to mtopolnik)Where is the filter defined? If it's on a logger then it would need to be on the specific logger category the message is being logged from as loggers don't inherit filters. If it's on the handler, it should work. I just tried upgrading 7.1.1.Final to use jboss-logmanager-1.5.1.Final and it worked fine for me. Make sure you change the module.xml to point to the new version.
--
James R. Perkins
-
4. Re: Re: Logging filter match semantics
mtopolnik Oct 8, 2013 4:35 PM (in response to jamezp)This is the context:
<subsystem xmlns="urn:jboss:domain:logging:1.1">
<console-handler name="CONSOLE">
<level name="INFO"/>
<filter>
<not>
<match pattern="JBAS011054"/>
</not>
</filter>
<formatter>
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
</formatter>
</console-handler>
<periodic-rotating-file-handler name="FILE">
<filter>
<not>
<match pattern="JBAS011054"/>
</not>
</filter>
<formatter>
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
</formatter>
<file relative-to="jboss.server.log.dir" path="server.log"/>
<suffix value=".yyyy-MM-dd"/>
<append value="true"/>
</periodic-rotating-file-handler>
I have edited module.xml and also deleted the old JARs. This is my modules/org/jboss/logmanager/main/module.xml:
<module xmlns="urn:jboss:module:1.1" name="org.jboss.logmanager">
<resources>
<resource-root path="jboss-logmanager-1.5.1.Final.jar"/>
<!-- Insert resources here -->
</resources>
<dependencies/>
</module>
-
5. Re: Re: Re: Logging filter match semantics
jamezp Oct 8, 2013 5:57 PM (in response to mtopolnik)Weird that looks similar to what I had. I just had a filter on the console-handler to filter out a deployment. My XML looks like:
<console-handler name="CONSOLE"> <level name="INFO"/> <formatter> <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%X{testId}%E%n"/> </formatter> <filter> <not> <match pattern="jboss-as-helloworld\.war"/> </not> </filter> </console-handler>
I saw nothing on the console about the deployment.
--
James R. Perkins
-
6. Re: Re: Re: Logging filter match semantics
mtopolnik Oct 9, 2013 1:49 PM (in response to jamezp)Here's a summary of expressions which do and don't work against the message.
These don't work:
"JBAS011054"
"Could not find default constructor"
"ComponentDescription"
These work:
"JBAS011006"
"StandardServletAsyncWebRequest"
I don't what to make of this except that I can't escape the feeling that there's something fishy going on in the implementation.
-
7. Re: Re: Re: Logging filter match semantics
mtopolnik Oct 9, 2013 2:12 PM (in response to mtopolnik)Correction: there is a simple explanation of my results. Pattern matching doesn't work against the string representation of the exception.
-
8. Re: Re: Re: Logging filter match semantics
jamezp Oct 9, 2013 2:29 PM (in response to mtopolnik)Ah-ha, yes. That was going to be my next question. I'll have a test and look on whether that should be happening or not.
--
James R. Perkins