作者:Eddy 历史版本:1 最后编辑:Eddy 更新时间:2024-11-15 09:05
编写版本:v3.5.0
适用版本:所有版本
后端服务如何修改log4j2异步等待策略
- 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"
- 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"
- log4j2.asyncLoggerWaitStrategy
Valid values: Block, Timeout, Sleep, Yield. default Timeout - https://logging.apache.org/log4j/2.x/manual/async.html