[
https://issues.jboss.org/browse/JBLOGGING-100?page=com.atlassian.jira.plu...
]
James Perkins commented on JBLOGGING-100:
-----------------------------------------
Just to put it here too. IMO the message should always be a string. Even trace or debug
log messages should have something more informative than {{Object.toString()}}. For
example if you object is {{null}} that's not much of a message to be printing. It
doesn't really tell you anything.
Also while {{java.lang.Object}} is the argument type only log4j supports it. JBoss Log
Manager, log4j2 and slf4j only support string message types.
JBossLogManagerLogger unconditionally does string conversion
------------------------------------------------------------
Key: JBLOGGING-100
URL:
https://issues.jboss.org/browse/JBLOGGING-100
Project: JBoss Logging
Issue Type: Patch
Security Level: Public(Everyone can see)
Components: jboss-logging-logmanager
Affects Versions: 3.1.3.GA
Reporter: Philippe Marschall
Assignee: James Perkins
{{JBossLogManagerLogger#doLog}} always converts the message to a String even if the level
isn't loggable. This can have a negative performance impact and result in a lot of
unnecessary allocations.
For example {{LogAuditProvider#audit}} does trace logging which ends up calling
{{AuditEvent#toString}} even if trace logging isn't enabled. In our case this results
in a lot of allocations outside of TLABs.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira