编写版本:v3.5.0
适用版本:所有版本

后端服务如何修改log4j2异步等待策略

  1. Linux系统,export IBPS_JVM_LOG_OPTS="-Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector -Dlog4j2.asyncLoggerWaitStrategy=Block -Dloggers.level=info -Dlog.level.console=info -Dlog.level.appender=info"
  2. windows系统,set IBPS_JVM_LOG_OPTS="-Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector -Dlog4j2.asyncLoggerWaitStrategy=Block -Dloggers.level=info -Dlog.level.console=info -Dlog.level.appender=info"
  3. log4j2.asyncLoggerWaitStrategy
    Valid values: Block, Timeout, Sleep, Yield. default Timeout
  4. https://logging.apache.org/log4j/2.x/manual/async.html
文档更新时间: 2022-01-23 16:23   作者:Eddy