Summary: | logger adapter, delagate call to logging method | ||
---|---|---|---|
Product: | Log4j - Now in Jira | Reporter: | luc peuvrier <lc.pvrr> |
Component: | Other | Assignee: | log4j-dev <log4j-dev> |
Status: | NEW --- | ||
Severity: | enhancement | ||
Priority: | P2 | ||
Version: | 1.2 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP |
Description
luc peuvrier
2011-09-08 02:55:25 UTC
An single instance of Logger is returned for any call to Logger.getLogger(). If there were multiple "wrapping" classes wrapping the same instance of Logger, they would be conflicting calls to setFQCN(). Is your wrapping class calling Logger.log(String callerFQCN, Priority level, Object message, Throwable t) which is designed for this scenarios? If so, are you running into any problems. calling Logger.forcedLog(String callerFQCN, Priority level,Object message, Throwable t) to "wrap" the logger is not because of multiples wrapping class. There is only one proprietary logging class that delegate to log4j. I do not see any reason to have multiple class for one project, but we can imagine multiple project using the same approach, so it can exist more than one "wrapping" class. so use of Logger.setFQCN is not a good solution. may be better to have addtionnal parameter to logger functions. |