Log4net logs are stored locally, while log4net logs are stored locally.
<? Xml version = "1.0" encoding = "UTF-8"?> <Configuration> <configSections> <section name = "log4net" type = "log4net. Config. Log4NetConfigurationSectionHandler, log4net"/> </configSections> <! -- Log4net Begin --> <log4net> <root> <! -- Control level, from low to high: all | debug | info | warn | error | fatal | off --> <level value = "All"/> <appender-ref = "rollinglogfileappender"/> <appender-ref = "leleappender"/> <appender-ref = "adonetappender_mysql"/> </root> <! -- <Logger name = "LogWriter"> <level value = "ALL"/> <appender-ref = "ADONetAppender"/> <appender-ref = "RollingLogFileAppender"/> </logger> --> <appender name = "AdoNetAppender_MySql" type = "log4net. appender. ADONetAppender "> <bufferSize value =" 1 "/> <connectionType value =" MySql. data. mySqlClient. mySqlConnection, MySql. data "/> <connectionString value =" server = 172.16.13.165; user id = microask; pwd = 123456; p Ort = 3306; pooling = True; database = microask2 "providerName =" MySql. data. mySqlClient; "/> <commandText value =" insert into t_system_log (Date1, Thread, Level, Logger, Message, Exception) VALUES (@ Date1, @ Thread, @ Level, @ Logger, @ Message, @ Exception) "/> <parameter> <parameterName value =" @ Date1 "/> <dbType value =" String "/> <layout type =" log4net. layout. rawTimeStampLayout "/> </parameter> <paramet ErName value = "@ Thread"/> <dbType value = "String"/> <size value = "100"/> <layout type = "log4net. layout. patternLayout "> <conversionPattern value =" % thread "/> </layout> </parameter> <parameterName value =" @ Level "/> <dbType value =" String & quot;/> <size value = "100"/> <layout type = "log4net. layout. patternLayout "> <conversionPattern value =" % level "/> </layout> </parameter> <parameterNa Me value = "@ Logger"/> <dbType value = "String"/> <size value = "100"/> <layout type = "log4net. layout. patternLayout "> <conversionPattern value =" % logger "/> </layout> </parameter> <parameterName value =" @ Message "/> <dbType value =" String & quot;/> <size value = "1000"/> <layout type = "log4net. layout. patternLayout "> <conversionPattern value =" % message "/> </layout> </parameter> <parameterN Ame value = "@ Exception"/> <dbType value = "String"/> <size value = "4000"/> <layout type = "log4net. layout. predictionlayout "/> </parameter> </appender> <! -- Setup the root category, add the appenders and set the default level --> <appender name = "RollingLogFileAppender" type = "log4net. appender. rollingFileAppender "> <param name =" File "value =" Log \ background log.txt "/> <param name =" AppendToFile "value =" true "/> <param name =" RollingStyle "value =" Date "/> <param name =" DatePattern "value =" yyyyMMdd "/> <param name =" StaticLogFileName "value =" true "/> <layout type = "l Og4net. layout. patternLayout, log4net "> <param name =" ConversionPattern "value =" % d [% t] %-5 p % c % m % n "/> <param name =" Header "value = "----------------------- header handler"/> <param name = "Footer" value = "--------------------- footer notebook"/> </layout> </appender> <appender name = "leleappender type "= "log4net. appender. consoleAppender "> <layout type =" log4net. layo Ut. patternLayout "> <param name =" ConversionPattern "value =" % d [% t] %-5 p % c % m % n "/> </layout> </appender> <! -- Setup the root category, add the appenders and set the default level --> </log4net> <! -- Log4net End --> </configuration>