[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-852) Internal Seam log messages are not producing line numbers or method name under Log4J.
Gavin King (JIRA)
jira-events at lists.jboss.org
Thu Feb 15 12:33:29 EST 2007
[ http://jira.jboss.com/jira/browse/JBSEAM-852?page=all ]
Gavin King updated JBSEAM-852:
------------------------------
Fix Version/s: 1.1.7.GA
thanks
> Internal Seam log messages are not producing line numbers or method name under Log4J.
> -------------------------------------------------------------------------------------
>
> Key: JBSEAM-852
> URL: http://jira.jboss.com/jira/browse/JBSEAM-852
> Project: JBoss Seam
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.1.6.GA
> Environment: Any
> Reporter: Mike Quilleash
> Assigned To: Gavin King
> Fix For: 1.1.7.GA
>
>
> Example of the Seam log during startup.
> INFO [javax.servlet.ServletContextListener] [main] (?:?) - Welcome to Seam 1.1.6.GA
> The ?:? indicate the logging could not determine the method and line number. I only believe this is a problem with Log4J.
> This is because the core Seam code is using Logging.getLogProvider() rather than Logging.getLog() like the @Logging injection does and the FQCN passed to Log4J is LogImpl which the LogProvider path does not call.
> Example
> private static final LogProvider log = Logging.getLogProvider(ServletContextListener.class);
> Doing a search/replace to replaces "Logging.getLogProvider(" with "Logging.getLog(" should fix the problem.
> A minor optimisation would be to modify LogImpl.interpolate() to (add the length check) to avoid calling/creating the interpolate component needlessly.
> private Object interpolate(Object object, Object... params)
> {
> if (object instanceof String && params.length > 0)
> {
> return Interpolator.instance().interpolate( (String) object, params );
> }
> else
> {
> return object;
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list