You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Yedidtah Wenner (Jira)" <ji...@apache.org> on 2021/01/28 16:13:00 UTC

[jira] [Updated] (LOG4J2-3008) Unable to Configure and Create a Logger with Programmatic Configuration

     [ https://issues.apache.org/jira/browse/LOG4J2-3008?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yedidtah Wenner updated LOG4J2-3008:
------------------------------------
    Summary: Unable to Configure and Create a Logger with Programmatic Configuration   (was: Unable to Configure and Create a Logger withProgrammatic Configuration )

> Unable to Configure and Create a Logger with Programmatic Configuration 
> ------------------------------------------------------------------------
>
>                 Key: LOG4J2-3008
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-3008
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders, Configuration, Configurators, Documentation
>    Affects Versions: 2.14.0
>            Reporter: Yedidtah Wenner
>            Priority: Major
>
> I am following the example for +Reconfigure Log4j Using ConfigurationBuilder with the Configurator+ that is published on the apache site ([https://logging.apache.org/log4j/2.x/manual/customconfig.html)] and it seems that no appender or logger are created. I am specifically trying to create a KafkaAppender. 
> When running the line Configurator.initialize(builder.build()), the configuration is not added to the context due to its state. I can see that the configuration is created properly its just not placed in the context.
> It seems that the state has to be changed first to initialized in order for the configuration to be applied and the context does not returned initialized.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)