vy commented on issue #2640:
URL: 
https://github.com/apache/logging-log4j2/issues/2640#issuecomment-2154294700

   @Yavor16, if you need to change the file name, you can just reconfigure the 
context:
   
   ```
   import org.apache.logging.log4j.core.config.Configurator;
   
   URI configSourceUri = new File("/path/to/a/different/log4j2.xml").toURI();
   Configurator.reconfigure(configSourceUri);
   ```
   
   > I tried now to create single LoggerContext instance but the app ran out of 
memory
   
   Given there is one `LoggerContext`, I am surprised to see OOM again. What 
was the culprit in this case?
   
   > Is there anything else I have to close
   
   One of the `shutdown()` methods of `LogManager` should suffice, you don't 
need to close every component individually.
   
   @Yavor16, since you're describing a pretty consistent failure scenario, 
would you mind sharing a **minimal reproduction**<sup>1</sup> example, please?
   
   <sup>1</sup> A `Repro.java` containing a `main()` method triggering the 
failure. It should **only** use the Java standard library; no Spring, no 
Flowable, nothing else. Mind removing every piece of code that doesn't effect 
the outcome of the failure.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to