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

Cannot get suggested method of reconfiguring to work

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Documentation
    • Labels:
      None

      Description

      Hi 

      Doesn't https://jira.apache.org/jira/browse/LOG4J2-2240 mean that the method of reconfiguration presented in https://logging.apache.org/log4j/log4j-2.4/faq.html#reconfig_from_code is broken? 

      If it is broken, think it'd be best to remove it from the docs, as it gives people a bum steer.

      I cannot seem to get it to work. Is there a test in log4j that verifies Something along the line of:

      1. Configures config C1.
      2. Initializes logger L. Logs an event. Asserts event is logged as-per config C1.
      3. Reconfigures to config C2 (e.g. changes appender pattern, modifies some other appender attribute, add/remove/modify loggers)
      4. Logs event to logger L. Asserts event is logged as-per config C2.

      Thanks

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              stonefruit a b
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: