What is the handling of iBATIS.NET logs?
What is the way to deal with iBATIS.NET logs? I believe many inexperienced people don't know what to do about it. Therefore, this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
IBATIS.Net provides convenient log processing and can output debugging information such as sql statements.
There are two commonly used ones:
IBATIS.Net log processing 1. Output to the console:
< configSections > < sectionGroup name= "iBATIS" > < section name= "logging" type= "IBatisNet.Common.Logging.ConfigurationSectionHandler, IBatisNet.Common" / > < / sectionGroup > < / configSections > < iBATIS > < logging > < logFactoryAdapter type= "IBatisNet.Common.Logging.Impl.TraceLoggerFA < arg key= "showLogName" value= "true" / > < arg key= "showDataTime" value= "true" / > < arg key= "level" value= "ALL" / > < arg key= "dateTimeFormat" value= "yyyy/MM/dd HH:mm:ss:SSS" / > < / logFactoryAdapter > < / logging > < / iBATIS >
IBATIS.Net log processing 2. Use log4net to output to files:
< configSections > < sectionGroup name= "iBATIS" > < section name= "logging" type= "IBatisNet.Common.Logging.ConfigurationSectionHandler, IBatisNet.Common" / > < section name= "log4net" type= "log4net.Config.Log4NetConfigurationSectionHandler, log4net" / > < / configSections > < iBATIS > < logging > < logFactoryAdapter type= "IBatisNet.Common.Logging.Impl.Log4NetLoggerFA IBatisNet.Common.Logging.Log4Net "> < arg key=" configType "value=" inline "/ > < / logFactoryAdapter > < / logging > < / iBATIS > < log4net >