Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-3008

Unable to Configure and Create a Logger with Programmatic Configuration

    XMLWordPrintableJSON

    Details

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Jedi27 Yedidtah Wenner
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: