[
https://jira.jboss.org/jira/browse/JBSEAM-4089?page=com.atlassian.jira.pl...
]
Francisco Jose Peredo Noguez commented on JBSEAM-4089:
------------------------------------------------------
Well, if you use SLF4J, you can use the log4j-over-slf4j-xxx.jar to redirect Log4JProvider
to Slf4j (that is what I do) after that, slf4j can re-redirect you logging anywhere...
But, I agree with you that the code in org.jboss.seam.log.Logging could be simplified it
called Slf4j directly (after all, Slf4j can also redirect to JDK logging using the
slf4j-jdk14-xxx.jar
Allow for custom LogProviders
-----------------------------
Key: JBSEAM-4089
URL:
https://jira.jboss.org/jira/browse/JBSEAM-4089
Project: Seam
Issue Type: Feature Request
Components: Core
Affects Versions: 2.1.1.GA
Reporter: Bob Thule
Please see forum:
http://www.seamframework.org/Community/CustomLogProvider
org.jboss.seam.log.Logging finds a log provider by:
static LogProvider getLogProvider(String category, boolean wrapped)
{
return isLog4JAvailable ?
new Log4JProvider(category, wrapped) :
new JDKProvider(category, wrapped);
}
This does not allow users to supply a custom log provider. There are two reasons I can
see for wanting to use a custom log provider:
1. To allow an alternative logging api, such as SLF4J. (for SLF$j, the current
work-around for this is to use an log4j-to-slf4j bridge jar)
2. To allow custom work to be done, such as when error is called, to looking for an
object in the contexts and to add a message to that object.
i.e.
public void error(String message, Exception e) {
((ErrorLog)Contexts.getSessionContext().get("errorLog")).add(message, e);
if (level>=ERROR)
logImp.error(message, e);
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira