log4j - log4j2 in Java project - Can't find output -
im new here, please me understand new project's log4j2 configuration.
my question is:
how log outputs?
from should search log files?
also how save tomcat console outputs in txt file?
i appreciate , support, today want learn new guys! thanks!
this log4j2.xml
:
<?xml version="1.0" encoding="utf-8"?> <configuration status="error" monitorinterval="1800"> <properties> <property name="log_home">\workspaces\logs\paymentweb</property> <property name="log_debug">${log_home}\app\debug.log</property> <property name="log_info">${log_home}\app\info.log</property> <property name="log_error">${log_home}\app\error.log</property> </properties> <appenders> <console name="console" target="system_out"> (onmismatch)--> <thresholdfilter level="trace" onmatch="accept" onmismatch="deny"/> <patternlayout pattern="%d{yyyy.mm.dd hh:mm:ss z} %-5level %class{36}.%m()/%l - %msg%xex%n"/> </console> <rollingrandomaccessfile name="app_debug" filename="${log_debug}" append="false" filepattern="${log_home}\$${date:yyyy-mm}\debug-%d{mm-dd-yyyy}-%i.log.gz"> <filters> <thresholdfilter level="debug" onmatch="accept" onmismatch="neutral"/> </filters> <patternlayout pattern="%d{yyyy-mm-dd hh:mm:ss z} %-5level %class{36}.%m()/%l - %msg%xex%n"/> <policies> <onstartuptriggeringpolicy /> <sizebasedtriggeringpolicy size="50 mb" /> <timebasedtriggeringpolicy /> </policies> </rollingrandomaccessfile> <customrollingrandomaccessfile name="app_info" filename="${log_info}" append="false" filepattern="${log_home}\$${date:yyyy-mm}\info-%d{mm-dd-yyyy}-%i.log.gz"> <filters> <thresholdfilter level="warn" onmatch="deny" onmismatch="neutral"/> <thresholdfilter level="info" onmatch="accept" onmismatch="deny"/> </filters> <patternlayout pattern="%d{yyyy-mm-dd hh:mm:ss z} %-5level %class{36}.%m()/%l - %msg%xex%n"/> <policies> <onstartuptriggeringpolicy /> <sizebasedtriggeringpolicy size="50 mb" /> <timebasedtriggeringpolicy /> </policies> </customrollingrandomaccessfile> <customrollingrandomaccessfile name="app_error" filename="${log_error}" append="false" filepattern="${log_home}\$${date:yyyy-mm}\error-%d{mm-dd-yyyy}-%i.log.gz"> <filters> <thresholdfilter level="warn" onmatch="accept" onmismatch="deny"/> </filters> <patternlayout pattern="%d{yyyy-mm-dd hh:mm:ss z} %-5level %class{36}.%m()/%l - %msg%xex%n"/> <policies> <onstartuptriggeringpolicy /> <sizebasedtriggeringpolicy size="50 mb" /> <timebasedtriggeringpolicy /> </policies> </customrollingrandomaccessfile> </appenders> <loggers> <root level="trace" additivity="false"> <appender-ref ref="console"/> <appender-ref ref="app_debug"/> <appender-ref ref="app_info"/> <appender-ref ref="app_error"/> </root> </loggers> </configuration>
all logs in \workspaces\logs\paymentweb\app*.log
Comments
Post a Comment