Regarding feature request discussion in log4j

2023-07-29 Thread Indiver Singhal
Hi,
I have a requirement to print all thread context param that is not printed
yet or converted by looking whole pattern. In custom logeventconverter
class  I have access to already converted string and thread context map
containing all parameters...but I don't have access to log4j pattern for
which it belongs to. Is there any way to access pattern in converter class




-- 
*Thanks,*

*Indiver Kumar,*
*Software Engineer,*
*8826469689*


Re: Regarding feature request discussion in log4j

2023-07-29 Thread Ralph Goers
In a PatternConverter you have access to the object to be formatted (in the 
case where this is a LogEventPatternConverter this will be the whole LogEvent), 
the StringBuilder where the output should go (and where previously formatted 
results already are), and any options that were passed configured on the 
converter in the pattern. No, you do not have access to the entire pattern.

Ralph


> On Jul 28, 2023, at 11:51 PM, Indiver Singhal  wrote:
> 
> Hi,
> I have a requirement to print all thread context param that is not printed
> yet or converted by looking whole pattern. In custom logeventconverter
> class  I have access to already converted string and thread context map
> containing all parameters...but I don't have access to log4j pattern for
> which it belongs to. Is there any way to access pattern in converter class
> 
> 
> 
> 
> -- 
> *Thanks,*
> 
> *Indiver Kumar,*
> *Software Engineer,*
> *8826469689*