On 29 Apr 2011, at 16:26, Olaf Bergner wrote:
Am 29.04.11 16:55, schrieb Galder ZamarreƱo:
> On Apr 28, 2011, at 11:47 PM, Manik Surtani wrote:
>
>> We do now support JBoss Logging.
>>
>>
https://issues.jboss.org/browse/ISPN-380
>>
>> @Galder, does JBoss Logging have support for what Mircea mentioned below?
> I've skimmed through the javadoc but didn't see anything in particular for
this at least around the message loggers which are the ones that help with
internationalization.
>
> I think it could be fitted but would require a fair amount of changes, such as making
some static loggers, particularly those for named cache components non static in order to
take the cache name. Maybe you could have a named cache component for a log factory?
A workaround that IMHO feels a little hackish though would be to simply
append the current cache's name to the class name when instantiating a
logger:
logger = LoggerFactory.getLogger(getClass().getName() + "[cache = " +
cacheName + "]")
I wouldn't recommend this.
That would also require having a logger/class
instance, and not make the logger static. For my scenario (DisttributionManagerImpl) that
might work as there's a single DisttributionManagerImpl per Cache.
Besides not being able to make the logger static. any other reasons for not going with
this approach?