Closed viratbiz closed 2 months ago
The most convenient way to do this is to configure it programmatically and enable it with a config flag.
Other than that, you can use Log4j2 Markers and log levels per environment to prevent logs from reaching the appender.
@viratbiz Is there anything more I can address in the scope of this issue?
I am trying to run the elastic search appender in log4j2.xml only in production environment. Is there any way to do this?