我在log4net中具有以下XML配置:
<?xml version="1.0" encoding="UTF-8"?>
<!-- UAT -->
<included scanPeriod="300 seconds" scan="true">
<logger name="<omitted for security>.profiling" level="INFO" additivity="false">
<appender-ref ref="servicePerformanceRollingFileAppender"/>
<appender-ref ref="consoleAppender"/>
</logger>
<logger name="<omitted for security>.efolder" level="ERROR" additivity="false">
<appender-ref ref="rollingFileAppenderServices"/>
<appender-ref ref="consoleAppender"/>
</logger>
<logger name="<omitted for security>.security" level="ERROR" additivity="false">
<appender-ref ref="rollingFileAppenderServices"/>
<appender-ref ref="consoleAppender"/>
</logger>
<logger name="<omitted for security>.webservices" level="ERROR" additivity="false">
<appender-ref ref="rollingFileAppenderServices"/>
<appender-ref ref="consoleAppender"/>
</logger>
<logger name="<omitted for security>.claimdevelopment" level="ERROR" additivity="false">
<appender-ref ref="rollingFileAppenderServices"/>
<appender-ref ref="consoleAppender"/>
</logger>
<logger name="org.springframework.cache" level="ERROR" additivity="false">
<appender-ref ref="rollingFileAppenderServices"/>
<appender-ref ref="consoleAppender"/>
</logger>
<logger name="org.springframework.jms" level="ERROR" additivity="false">
<appender-ref ref="rollingFileAppenderServices"/>
<appender-ref ref="consoleAppender"/>
</logger>
<logger name="org.springframework.cache.annotation" level="ERROR" additivity="false">
<appender-ref ref="rollingFileAppenderServices"/>
<appender-ref ref="consoleAppender"/>
</logger>
<logger name="org.springframework.security" level="ERROR" additivity="false">
<appender-ref ref="rollingFileAppenderServices"/>
<appender-ref ref="consoleAppender"/>
</logger>
<logger name="org.opensaml" level="ERROR" additivity="false">
<appender-ref ref="rollingFileAppenderServices"/>
<appender-ref ref="consoleAppender"/>
</logger>
<logger name="org.springframework.security.saml.metadata" level="ERROR" additivity="false">
<appender-ref ref="rollingFileAppenderServices"/>
<appender-ref ref="consoleAppender"/>
</logger>
<root level="ERROR">
<appender-ref ref="consoleAppender"/>
<appender-ref ref="rollingFileAppenderServices"/>
</root>
</included>
我需要将所有这些输出到stderr以获得日志级别错误,并输出到std以获得信息...
不太确定我需要为此进行哪些更改。我在Google上搜索了一下,似乎偶然发现的所有内容都只是破坏了我的代码库。