logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Strong Su <lovelo...@gmail.com>
Subject Re: How can I use asyncLogger programmatically?
Date Thu, 10 Dec 2015 02:35:25 GMT
It turns out that I should also init a new AsyncLoggerContext.
And then it will work and use asyncLogger.

On Wed, Dec 9, 2015 at 10:30 PM, Strong Su <lovelosew@gmail.com> wrote:

> Hello everyone,
>
> I'm trying to use log4j2 programmatically. And I follow the instruction of
> Programmatically Modifying the Current Configuration after Initialization.
>
> http://logging.apache.org/log4j/2.x/manual/customconfig.html#AddingToCurrent
> That worked but it's using syncLogger.
> I think changing LoggerConfig.createLogger to
> AsyncLoggerConfig.createLogger may works but it didn't.
>
> So how can I using asyncLogger in log4j2 programmatically after
> initiallization?
> I'm using log4j2.3.
>
> Thank you very much.
>
> Best Regards,
> Dylan Su
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message