Blame view
framework/base/config/log4j2.xml
2.72 KB
c16038356
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
<?xml version="1.0" encoding="UTF-8"?> <Configuration monitorInterval="60"> <!-- Default configuration for logging; for customizations refer to http://logging.apache.org/log4j/2.x/manual/configuration.html. With this configuration the following behavior is defined: * all log messages of severity "warning" or greater, generated by external jars, are logged in the ofbiz.log file and in the console * all log messages of any severity, generated by OFBiz, are logged in the ofbiz.log file and in the console * all log messages of severity "error" or greater are also logged in the error.log file When the ofbiz.log file reaches 1MB in size a new file is created and a date/sequence suffix is added; up to 10 files are kept. When the error.log file reaches 1MB in size a new file is created and a date/sequence suffix is added; up to 3 files are kept. The settings in this configuration file can be changed without restarting the instance: every 60 seconds the file is checked for modifications. --> <Appenders> <Console name="stdout" target="SYSTEM_OUT"> <PatternLayout pattern="%date{DEFAULT} |%-20.20thread |%-30.30logger{1}|%level{length=1}| %message%n"/> </Console> <RollingFile name="ofbiz" fileName="runtime/logs/ofbiz.log" filePattern="runtime/logs/ofbiz-%d{yyyy-MM-dd}-%i.log"> <PatternLayout pattern="%date{DEFAULT} |%-20.20thread |%-30.30logger{1}|%level{length=1}| %message%n"/> <Policies> <TimeBasedTriggeringPolicy/> <SizeBasedTriggeringPolicy size="1 MB"/> </Policies> <DefaultRolloverStrategy max="10"/> </RollingFile> <RollingFile name="error" fileName="runtime/logs/error.log" filePattern="runtime/logs/error-%d{yyyy-MM-dd}-%i.log"> <ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/> <PatternLayout pattern="%date{DEFAULT} |%-20.20thread |%-30.30logger{1}|%level{length=1}| %message%n"/> <Policies> <TimeBasedTriggeringPolicy/> <SizeBasedTriggeringPolicy size="1 MB"/> </Policies> <DefaultRolloverStrategy max="3"/> </RollingFile> <Async name="async"> <AppenderRef ref="ofbiz"/> <AppenderRef ref="stdout"/> <AppenderRef ref="error"/> </Async> </Appenders> <Loggers> <logger name="org.ofbiz.base.converter.Converters" level="warn"/> <logger name="org.apache" level="warn"/> <logger name="freemarker" level="warn"/> <Root level="all"> <AppenderRef ref="async"/> </Root> </Loggers> </Configuration> |