Derive a class from ObjectRenderer and define which class should be rendered by
your new renderer:
<renderer renderedClass="java.lang.String"
renderingClass="foo.bar.myRenderer"/>
Then you overwrite the method doRender(), where you obtain the String as
parameter. Do whatever you like with it and return your result as a rendered
string.
You can also render any other class withing a specialized custom renderer.
Remeber that the parameter of a log call (i.e. myLogger.info( ... ) ) is
formally an abstract Object and not a String. So you can pass any object to the
logger. The logger framework will pass the received object to the appropriate
renderer in order to transform it to an output string.
Heri
> -----Original Message-----
> From: news [mailto:[EMAIL PROTECTED] Behalf Of Adam Megacz
> Sent: Wednesday, August 17, 2005 8:17 AM
> To: [email protected]
> Subject: seize all logging messages?
>
>
>
> Assuming that log4j is up and running in some unknown state, is there
> any way to programmatically intercept all log messages and "do
> something" with them?
>
> Most of the log4j docs seem oriented towards static configuration
> (properties files) rather than dynamic configuration.
>
> - a
>
> --
> PGP/GPG: 5C9F F366 C9CF 2145 E770 B1B8 EFB1 462D A146 C380
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]