[logback-user] Object rendering
Manuel Uberti
manuel.uberti at gmail.com
Fri Jan 13 12:47:51 CET 2012
Hi,
I am new to logback, and I was asked to migrate our project from log4j to
logback. I was wondering if there's any kind of support for object
rendering such as in log4j.
This is what we're now doing with log4j.
public static LoggerRepository getLoggerRepository() {
if (loggerRepository == null) {
loggerRepository =
org.apache.log4j.LogManager.getLoggerRepository();
}
return loggerRepository;
}
public static RendererSupport getRendererSupport() {
LoggerRepository lr = getLoggerRepository();
if ((lr != null) && (lr instanceof RendererSupport))
rendererSupport = (RendererSupport) lr;
return rendererSupport;
}
public static ObjectRender getRendererObject(Class<?> clazz) {
ObjectRender renderer =
getRendererSupport().getRendererMap().get(clazz);
return renderer;
}
Any thoughts?
Thank you,
Manuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20120113/a3db77c5/attachment.html>
More information about the Logback-user
mailing list