You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-cs@ibatis.apache.org by zh...@umich.edu on 2006/10/14 19:56:28 UTC
Log4net...
I copied and pasted configuration in the ibatis sqlmapper document for
logging but I didn't get anything in the log file about SQL statements
and IBATIS. I am using VS2005 .NET 2 and log4net for log. What should i
do to log all SQL statement in the log file? Should I call some
functions? objects? ...
-Henry
Re: ibatis.net api doc
Posted by Gilles Bayon <ib...@gmail.com>.
You got them with the binaries.
On 10/16/06, Henry Lu <zh...@umich.edu> wrote:
> How and where do we get the ibatis.net api documentation like java
> version or can be searched in the VS .NET 2005?
>
> -Henry
>
--
Cheers,
Gilles
<a href="http://www.amazon.com/gp/registry/6JCP7AORB0LE">Wish List</a>
ibatis.net api doc
Posted by Henry Lu <zh...@umich.edu>.
How and where do we get the ibatis.net api documentation like java
version or can be searched in the VS .NET 2005?
-Henry
Re: Log4net...
Posted by Don Dwoske <do...@loraxis.com>.
I have a similar setup to what you've described, so I've included my
application config file below which is working. this file is named
the same as my application plus a .config on the end (lwa.exe.config)
and lives in the same directory as the executable. Make sure you also
have references to log4net.dll and
IBatisNet.Common.Logging.Log4Net.dll in your project.. if you don't
have the latter, silently nothing happens :
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="iBATIS">
<section name="logging"
type="IBatisNet.Common.Logging.ConfigurationSectionHandler,
IBatisNet.Common" />
</sectionGroup>
<section name="log4net"
type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
<appSettings>
<add key="log4net.Internal.Debug" value="false"/>
</appSettings>
<system.diagnostics>
<trace autoflush="false">
<listeners>
<add name="textWriterTraceListener"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="C:\\inetpub\\wwwroot\\log4net.txt" />
</listeners>
</trace>
</system.diagnostics>
<iBATIS>
<logging>
<logFactoryAdapter
type="IBatisNet.Common.Logging.Impl.Log4NetLoggerFA,
IBatisNet.Common.Logging.Log4Net">
<arg key="configType" value="inline" />
</logFactoryAdapter>
</logging>
</iBATIS>
<log4net>
<appender name="ConsoleAppender"
type="log4net.Appender.ConsoleAppender" >
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level
%logger - %message%newline" />
</layout>
</appender>
<appender name="RollingFileAppender"
type="log4net.Appender.RollingFileAppender">
<file value="lwa.log" />
<appendToFile value="true" />
<maximumFileSize value="100KB" />
<maxSizeRollBackups value="5" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger
- %message%newline" />
</layout>
</appender>
<root>
<level value="DEBUG" />
<appender-ref ref="ConsoleAppender" />
<appender-ref ref="RollingFileAppender" />
</root>
<logger name="IBatisNet.DataMapper.Commands.DefaultPreparedCommand">
<level value="INFO" />
</logger>
<logger name="IBatisNet.DataMapper.Configuration.Cache.CacheModel">
<level value="INFO" />
</logger>
<logger name="IBatisNet.DataMapper.LazyLoadList">
<level value="INFO" />
</logger>
<logger name="IBatisNet.DataMapper.SqlMapSession">
<level value="INFO" />
</logger>
<logger name="IBatisNet.Common.Transaction.TransactionScope">
<level value="INFO" />
</logger>
<logger name="IBatisNet.DataAccess.DaoSession">
<level value="INFO" />
</logger>
<logger name="IBatisNet.DataAccess.Configuration.DaoProxy">
<level value="INFO" />
</logger>
<logger
name="IBatisNet.DataMapper.Configuration.Statements.PreparedStatementFactory">
<level value="OFF" />
</logger>
<logger name="IBatisNet.DataMapper.Commands.IPreparedCommand">
<level value="OFF" />
</logger>
<logger name="anmar.SharpMimeTools.SharpMimeTools">
<level value="DEBUG" />
</logger>
<logger name="anmar.SharpMimeTools.SharpMimeMessage">
<level value="DEBUG" />
</logger>
</log4net>
</configuration>
On 10/14/06, zhlu@umich.edu <zh...@umich.edu> wrote:
> I copied and pasted configuration in the ibatis sqlmapper document for
> logging but I didn't get anything in the log file about SQL statements
> and IBATIS. I am using VS2005 .NET 2 and log4net for log. What should i
> do to log all SQL statement in the log file? Should I call some
> functions? objects? ...
>
> -Henry
>
--
---------------------------------------
Donald Dwoske
Software Journeyman
http://www.loraxis.com/ddwoske