github.com/OrigamiWang/msd/micro@v0.0.0-20240229032328-b62246268db9/log4go.xml (about) 1 <logging> 2 <filter enabled="true"> 3 <tag>stdout</tag> 4 <type>console</type> 5 <level>DEBUG</level> 6 <exclude>mgox</exclude> 7 </filter> 8 <filter enabled="true"> 9 <tag>file_finest</tag> 10 <type>file</type> 11 <!-- level is (:?FINEST|FINE|DEBUG|TRACE|INFO|WARNING|ERROR) --> 12 <level>FINEST</level> 13 <!--<exclude>github.com/yaosxi</exclude>--> 14 <property name="filename">log/finest.log</property> 15 <!-- 16 %T - Time (15:04:05 MST) 17 %t - Time (15:04) 18 %D - Date (2006/01/02) 19 %d - Date (01/02/06) 20 %L - Level (FNST, FINE, DEBG, TRAC, WARN, EROR, CRIT) 21 %S - Source 22 %M - Message 23 It ignores unknown format strings (and removes them) 24 Recommended: "[%D %T] [%L] (%S) %M" 25 --> 26 <property name="format">[%D %T] [%L] (%S) %M</property> 27 <property name="rotate">true</property> <!-- true enables log rotation, otherwise append --> 28 <property name="maxsize">1000M</property> <!-- \d+[KMG]? Suffixes are in terms of 2**10 --> 29 <property name="maxlines">1000K</property> <!-- \d+[KMG]? Suffixes are in terms of thousands --> 30 <property name="daily">true</property> <!-- Automatically rotates when a log message is written after midnight --> 31 </filter> 32 <filter enabled="true"> 33 <tag>file_info</tag> 34 <type>file</type> 35 <level>INFO</level> 36 <property name="filename">log/info.log</property> 37 <property name="format">[%D %T] [%L] (%S) %M</property> 38 <property name="rotate">true</property> 39 <property name="maxsize">1000M</property> 40 <property name="maxlines">1000K</property> 41 <property name="daily">true</property> 42 </filter> 43 <filter enabled="true"> 44 <tag>file_error</tag> 45 <type>file</type> 46 <level>ERROR</level> 47 <property name="filename">log/error.log</property> 48 <property name="format">[%D %T] [%L] (%S) %M</property> 49 <property name="rotate">true</property> 50 <property name="maxsize">1000M</property> 51 <property name="maxlines">1000K</property> 52 <property name="daily">true</property> 53 </filter> 54 <filter enabled="false"> 55 <tag>xmllog</tag> 56 <type>xml</type> 57 <level>TRACE</level> 58 <property name="filename">trace.xml</property> 59 <property name="rotate">true</property> 60 <property name="maxsize">1000M</property> 61 <property name="maxrecords">1000K</property> 62 <property name="daily">false</property> 63 </filter> 64 <filter enabled="false"> 65 <tag>donotopen</tag> 66 <type>socket</type> 67 <level>FINEST</level> 68 <property name="endpoint">192.168.1.255:12124</property> <!-- recommend UDP broadcast --> 69 <property name="protocol">udp</property> <!-- tcp or udp --> 70 </filter> 71 </logging>