개정판 ce3f0d7a
issue #745: change logger with log4net
Change-Id: I1be08796d6f1a110b7ec3f94121a6bea96fc7b56
KCOM/app.config | ||
---|---|---|
18 | 18 |
<appender name="AdoNetAppender" type="log4net.Appender.AdoNetAppender"> |
19 | 19 |
<bufferSize value="100" /> |
20 | 20 |
<connectionType value="System.Data.SQLite.SQLiteConnection, System.Data.SQLite" /> |
21 |
<connectionString type="log4net.Util.PatternString" value="Data Source=%property{LogFilePath};Version=3;Synchronous=Off" /> |
|
21 |
<connectionString type="log4net.Util.PatternString" value="Data Source=%property{LogDBFilePath};Version=3;Synchronous=Off" />
|
|
22 | 22 |
<commandText value="INSERT INTO Log (Date, Level, Logger, Message, StackTrace) VALUES (@Date, @Level, @Logger, @Message, @StackTrace)" /> |
23 | 23 |
<parameter> |
24 | 24 |
<parameterName value="@Date" /> |
... | ... | |
54 | 54 |
</layout> |
55 | 55 |
</parameter> |
56 | 56 |
</appender> |
57 |
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender"> |
|
58 |
<file type="log4net.Util.PatternString" value="%property{LogFilePath}" /> |
|
59 |
<datePattern value="yyyy-MM-dd.log" /> |
|
60 |
<appendToFile value="true" /> |
|
61 |
<rollingStyle value="Size" /> |
|
62 |
<maximumFileSize value="100KB" /> |
|
63 |
<maxSizeRollBackups value="100" /> |
|
64 |
<!-- Use -1 for unlimited--> |
|
65 |
<staticLogFileName value="true" /> |
|
66 |
<countDirection value="1" /> |
|
67 |
<layout type="log4net.Layout.PatternLayout"> |
|
68 |
<!--<header value="DATE MESSAGE " /> --> |
|
69 |
<param name="ConversionPattern" value="%date %message %newline" /> |
|
70 |
</layout> |
|
71 |
</appender> |
|
57 | 72 |
<root> |
58 | 73 |
<level value="ALL" /> |
59 |
<appender-ref ref="AdoNetAppender" /> |
|
60 | 74 |
</root> |
75 |
<logger name="DBLogger" additivity="false"> |
|
76 |
<level value="ALL" /> |
|
77 |
<appender-ref ref="AdoNetAppender" /> |
|
78 |
</logger> |
|
79 |
<logger name="EventLogger" additivity="false"> |
|
80 |
<level value="ALL" /> |
|
81 |
<appender-ref ref="RollingFileAppender" /> |
|
82 |
</logger> |
|
61 | 83 |
</log4net> |
62 | 84 |
<runtime> |
63 | 85 |
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> |
내보내기 Unified diff