Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the handling of iBATIS.NET logs?

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

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 >

Share To

Development

© 2024 shulou.com SLNews company. All rights reserved.

12
Report