[
https://issues.jboss.org/browse/AS7-4964?page=com.atlassian.jira.plugin.s...
]
David Lloyd commented on AS7-4964:
----------------------------------
Just to clarify, what you describe is *not* a bug. You're still confusing category
with class name (package name is part of the class name). A category *looks* like a
package name but it is *not* a package name.
{quote}
1) the ill behavior described is based on
category="org.jboss.as.server.deployment" (no class name)
{quote}
That's because the message being logged from the class in the
{{org.jboss.as.server.deployment}} package is being logged to the {{org.jboss.as.server}}
category. To avoid confusion, you should change your format to use {{%c}} instead of (or
in addition to) {{%C}} - that'll clarify the situation for you immensely. Also to
reiterate, using {{%C}} will impose a performance overhead.
{quote}
2) strangely, if category="org.jboss.as.server" (w/o deployment) the "INFO
[org.jboss.as.server.deployment.DeploymentHandlerUtil$1] JBAS018559: Deployed
"myapp.ear"" is displayed on the console.
{quote}
Again, quite expected because the category of this message is {{org.jboss.as.server}} even
though the class is in the {{org.jboss.as.server.deployment}} package.
log message omitted from log when $ in class name
-------------------------------------------------
Key: AS7-4964
URL:
https://issues.jboss.org/browse/AS7-4964
Project: Application Server 7
Issue Type: Bug
Components: Logging
Affects Versions: 7.1.1.Final
Reporter: Kelly Dolan
Assignee: James Perkins
<subsystem xmlns="urn:jboss:domain:logging:1.1">
<console-handler name="CONSOLE" autoflush="true">
<level name="INFO"/>
<formatter>
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%C]
%m%n"/>
</formatter>
<target name="System.out"/>
</console-handler>
<periodic-rotating-file-handler name="SERVER"
autoflush="true">
<level name="INFO"/>
<formatter>
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%C]
%m%n"/>
</formatter>
<file relative-to="jboss.server.log.dir"
path="server.log"/>
<suffix value=".yyyy-MM-dd"/>
<append value="true"/>
</periodic-rotating-file-handler>
<periodic-rotating-file-handler name="APPLICATION"
autoflush="true">
<level name="INFO"/>
<formatter>
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%C]
%m%n"/>
</formatter>
<file relative-to="jboss.server.log.dir"
path="application.log"/>
<suffix value=".yyyy-MM-dd"/>
<append value="true"/>
</periodic-rotating-file-handler>
<logger category="com.arjuna">
<level name="WARN"/>
</logger>
<logger category="org.apache.tomcat.util.modeler">
<level name="WARN"/>
</logger>
<logger category="sun.rmi">
<level name="WARN"/>
</logger>
<logger category="jacorb">
<level name="WARN"/>
</logger>
<logger category="jacorb.config">
<level name="ERROR"/>
</logger>
<logger category="my.company">
<level name="INFO"/>
<handlers>
<handler name="APPLICATION"/>
</handlers>
</logger>
<logger category="org.jboss.as.server.deployment">
<level name="INFO"/>
<handlers>
<handler name="CONSOLE"/>
</handlers>
</logger>
<root-logger>
<level name="WARN"/>
<handlers>
<handler name="SERVER"/>
</handlers>
</root-logger>
</subsystem>
With this, I expect
a) all WARN messages to log in server.log
b) all INFO messages for my.company classes to log in server.log and application.log
c) all INFO messages for org.jboss.as.server.deployment to log in server.log and on the
console
(a) and (b) appear to work fine. (c) not so much.
I see "INFO [org.jboss.as.server.deployment.AbstractDeploymentUnitService]
JBAS015876: Starting deployment of "myapp.ear"" in both server.log and on
the console.
I do NOT see "INFO [org.jboss.as.server.deployment.DeploymentHandlerUtil$1]
JBAS018559: Deployed "myapp.ear"" in either server.log and on the console.
The only thing I can see that is weird about the one not being included in the log is
that the message is logged w/in an inner class. Ultimately, my goal is to change
<logger category="org.jboss.as.server.deployment"> to <logger
category="org.jboss.as.server.deployment.DeploymentHandlerUtil$1"> as I only
want to log JBoss WARN messages w/ the exception of the "Deployed" message.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira