我最近将日志记录框架从log4j升级到了log4j2。我试图记录电线跟踪,但未将其写入目标文件。我添加了其他几个记录器,它们工作正常。这是我使用的配置-
# Wire log appender configuration
*.*.log4j2.appender.WIRE.name = "WIRE";
*.*.log4j2.appender.WIRE.type = "RollingRandomAccessFile";
*.*.log4j2.appender.WIRE.filePattern = "$ROOT/var/output/logs/wire.log";
*.*.log4j2.appender.WIRE.layout.type = "PatternLayout";
*.*.log4j2.appender.WIRE.layout.pattern = "%d{DATE} [%p] %X{RequestId} (%t) %c: %m%n";
*.*.log4j2.loggers += (WIRE);
*.*.log4j2.logger.WIRE.appenderRefs = ("WIRE");
*.*.log4j2.logger.WIRE.level = "TRACE";
*.*.log4j2.logger.WIRE.additivity = false;