No, Log4j 2 does not support Log4j 1 renderers. To be honest, this is the first 
email 
received on this list to ever ask about it.

Log4j 1 used renderers because it logged Objects and the only things known 
about 
an object is that it has class name and a toString method. 

Log4j 2 logs Messages. See 
http://logging.apache.org/log4j/2.x/manual/messages.html 
<http://logging.apache.org/log4j/2.x/manual/messages.html>. You 
could get the same effect as the Log4j 1 Renderer by creating a custom 
MessageFactory 
that looks at the type of objects being passed and chooses the Message 
implementation to 
use based on that. To be honest though, most people doing more than simple 
logging use 
a MapMessage for which most of Log4j’s Layouts provide direct support.

Ralph



> On Nov 22, 2021, at 11:02 PM, Pardeep Kumar <[email protected]> 
> wrote:
> 
> Hi
>      I have upgraded log4j1.x to log4j2.x. In log4j2 currenty there is no
> renderer support. Can you please tell what is the alternative in log4j2 or
> is there any timeline to add renderers in log4j2 ? Can you please give some
> information on this?
> 
> Thanks and regards,
> Pardeep Kumar

Reply via email to