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