[infinispan-dev] cache name in logs
Mircea Markus
mircea.markus at jboss.com
Wed Apr 27 10:55:35 EDT 2011
Hi,
I'm looking into some logs for the a JBW demo : it has 4 caches deployed on each node and lots of topology changes happen. It's close to impossible to tell which log pertains to which cache, especially around the DistributionInterceptorImpl.
Wouldn't it make sense that, for certain components, to include the name of the cache in the logs? IThis might be achieved with minimal changes by adding an additional param to the LogFactory.getLog(Class) method and let the logger itself do the heavy lifting.
e.g.
Log l = LogFactory.getLog(DistributionManagerImpl.class, "cacheName");
and on each call l.trace("A message") the logger might output, besides underlying log's format, the string "[cacheName] A message".
Wdyt?
Cheers,
Mircea
More information about the infinispan-dev
mailing list