Thanks for the answer, I tried to get that to work (with a config section)
first before I modified the source, but I will try it again.

Ok, it might be that when I tried the windows form application and got
logging to work at first it was using a compiled version of iBatis (not
SVN), and now it is due to the missing config section.

How about the result set logging?

-----------------

I get the following warnings (if that's what you are interested in):

-----------------

Warning 1       Use command line option '/keyfile' or appropriate project
settings instead of 'AssemblyKeyFile'
C:\dev\test\ibsvn\mapper\IBatisNet.Common\AssemblyInfo.cs       63      12
IBatisNet.Common
Warning 2       Ambiguous reference in cref attribute:
'System.Type.GetType'. Assuming 'System.Type.GetType()', but could have also
matched other overloads including 'System.Type.GetType(string)'.
C:\dev\test\ibsvn\mapper\IBatisNet.Common\Utilities\TypesResolver\TypeResolv
er.cs   46      46      IBatisNet.Common
Warning 3       'System.Reflection.Assembly.LoadWithPartialName(string)' is
obsolete: 'This method has been deprecated. Please use Assembly.Load()
instead. http://go.microsoft.com/fwlink/?linkid=14202'
C:\dev\test\ibsvn\mapper\IBatisNet.Common\Utilities\TypesResolver\TypeResolv
er.cs   90      25      IBatisNet.Common
Warning 4
'System.Configuration.ConfigurationSettings.GetConfig(string)' is obsolete:
'This method is obsolete, it has been replaced by
ConfigurationManager.GetSection'
C:\dev\test\ibsvn\mapper\IBatisNet.Common\Logging\LogManager.cs 107     27
IBatisNet.Common
Warning 5
'System.Collections.Specialized.NameValueCollection.NameValueCollection(Syst
em.Collections.IHashCodeProvider, System.Collections.IComparer)' is
obsolete: 'Please use NameValueCollection(IEqualityComparer) instead.'
C:\dev\test\ibsvn\mapper\IBatisNet.Common\Logging\LogManager.cs 178     65
IBatisNet.Common
Warning 6       'System.Reflection.Assembly.LoadWithPartialName(string)' is
obsolete: 'This method has been deprecated. Please use Assembly.Load()
instead. http://go.microsoft.com/fwlink/?linkid=14202'
C:\dev\test\ibsvn\mapper\IBatisNet.Common\Utilities\Resources.cs        407
25      IBatisNet.Common
Warning 7
'System.Configuration.ConfigurationException.ConfigurationException(string)'
is obsolete: 'This class is obsolete, to create a new exception create a
ConfigurationErrorsException'
C:\dev\test\ibsvn\mapper\IBatisNet.Common\Logging\Impl\Log4NetLoggerFA.cs
62      12      IBatisNet.Common
Warning 8
'System.Configuration.ConfigurationException.ConfigurationException(string)'
is obsolete: 'This class is obsolete, to create a new exception create a
ConfigurationErrorsException'
C:\dev\test\ibsvn\mapper\IBatisNet.Common\Logging\Impl\Log4NetLoggerFA.cs
65      12      IBatisNet.Common
Warning 9
'System.Collections.Specialized.NameValueCollection.NameValueCollection(Syst
em.Collections.IHashCodeProvider, System.Collections.IComparer)' is
obsolete: 'Please use NameValueCollection(IEqualityComparer) instead.'
C:\dev\test\ibsvn\mapper\IBatisNet.Common\Logging\ConfigurationSectionHandle
r.cs    97      37      IBatisNet.Common
Warning 10      Use command line option '/keyfile' or appropriate project
settings instead of 'AssemblyKeyFile'
C:\dev\test\ibsvn\mapper\IBatisNet.DataMapper\AssemblyInfo.cs   61      12
IBatisNet.DataMapper
Warning 11      Possible unintended reference comparison; to get a value
comparison, cast the left hand side to type 'string'
C:\dev\test\ibsvn\mapper\IBatisNet.DataMapper\TypeHandlers\BaseTypeHandler.c
s       98      12      IBatisNet.DataMapper
Warning 12      'System.Data.IDbDataParameter.Precision' is obsolete:
'Precision has been deprecated.  Use the Math classes to explicitly set the
precision of a decimal.  http://go.microsoft.com/fwlink/?linkid=14202'
C:\dev\test\ibsvn\mapper\IBatisNet.DataMapper\Commands\DefaultPreparedComman
d.cs    219     6       IBatisNet.DataMapper
Warning 13      'System.Data.IDbDataParameter.Precision' is obsolete:
'Precision has been deprecated.  Use the Math classes to explicitly set the
precision of a decimal.  http://go.microsoft.com/fwlink/?linkid=14202'
C:\dev\test\ibsvn\mapper\IBatisNet.DataMapper\Commands\DefaultPreparedComman
d.cs    219     52      IBatisNet.DataMapper
Warning 14      'System.Data.IDbDataParameter.Scale' is obsolete: 'Scale has
been deprecated.  Use the Math classes to explicitly set the scale of a
decimal.  http://go.microsoft.com/fwlink/?linkid=14202'
C:\dev\test\ibsvn\mapper\IBatisNet.DataMapper\Commands\DefaultPreparedComman
d.cs    224     6       IBatisNet.DataMapper
Warning 15      'System.Data.IDbDataParameter.Scale' is obsolete: 'Scale has
been deprecated.  Use the Math classes to explicitly set the scale of a
decimal.  http://go.microsoft.com/fwlink/?linkid=14202'
C:\dev\test\ibsvn\mapper\IBatisNet.DataMapper\Commands\DefaultPreparedComman
d.cs    224     48      IBatisNet.DataMapper
Warning 16      'System.Data.IDbDataParameter.Precision' is obsolete:
'Precision has been deprecated.  Use the Math classes to explicitly set the
precision of a decimal.  http://go.microsoft.com/fwlink/?linkid=14202'
C:\dev\test\ibsvn\mapper\IBatisNet.DataMapper\Commands\EmbedParamsPreparedCo
mmand.cs        151     6       IBatisNet.DataMapper
Warning 17      'System.Data.IDbDataParameter.Precision' is obsolete:
'Precision has been deprecated.  Use the Math classes to explicitly set the
precision of a decimal.  http://go.microsoft.com/fwlink/?linkid=14202'
C:\dev\test\ibsvn\mapper\IBatisNet.DataMapper\Commands\EmbedParamsPreparedCo
mmand.cs        151     52      IBatisNet.DataMapper
Warning 18      'System.Data.IDbDataParameter.Scale' is obsolete: 'Scale has
been deprecated.  Use the Math classes to explicitly set the scale of a
decimal.  http://go.microsoft.com/fwlink/?linkid=14202'
C:\dev\test\ibsvn\mapper\IBatisNet.DataMapper\Commands\EmbedParamsPreparedCo
mmand.cs        156     6       IBatisNet.DataMapper
Warning 19      'System.Data.IDbDataParameter.Scale' is obsolete: 'Scale has
been deprecated.  Use the Math classes to explicitly set the scale of a
decimal.  http://go.microsoft.com/fwlink/?linkid=14202'
C:\dev\test\ibsvn\mapper\IBatisNet.DataMapper\Commands\EmbedParamsPreparedCo
mmand.cs        156     48      IBatisNet.DataMapper
Warning 20      'System.Xml.XmlValidatingReader' is obsolete: 'Use XmlReader
created by XmlReader.Create() method using appropriate XmlReaderSettings
instead. http://go.microsoft.com/fwlink/?linkid=14202'
C:\dev\test\ibsvn\mapper\IBatisNet.DataMapper\Configuration\DomSqlMapBuilder
.cs     541     4       IBatisNet.DataMapper
Warning 21      'System.Xml.XmlValidatingReader' is obsolete: 'Use XmlReader
created by XmlReader.Create() method using appropriate XmlReaderSettings
instead. http://go.microsoft.com/fwlink/?linkid=14202'
C:\dev\test\ibsvn\mapper\IBatisNet.DataMapper\Configuration\DomSqlMapBuilder
.cs     548     28      IBatisNet.DataMapper
Warning 22
'System.Configuration.ConfigurationException.ConfigurationException(string,
System.Exception)' is obsolete: 'This class is obsolete, to create a new
exception create a ConfigurationErrorsException'
C:\dev\test\ibsvn\mapper\IBatisNet.DataMapper\Scope\ConfigurationScope.cs
300     13      IBatisNet.DataMapper
Warning 23
'System.Configuration.ConfigurationException.ConfigurationException(string,
System.Exception)' is obsolete: 'This class is obsolete, to create a new
exception create a ConfigurationErrorsException'
C:\dev\test\ibsvn\mapper\IBatisNet.DataMapper\Scope\ConfigurationScope.cs
326     13      IBatisNet.DataMapper
Warning 24      'System.Data.IDbDataParameter.Precision' is obsolete:
'Precision has been deprecated.  Use the Math classes to explicitly set the
precision of a decimal.  http://go.microsoft.com/fwlink/?linkid=14202'
C:\dev\test\ibsvn\mapper\IBatisNet.DataMapper\Configuration\Statements\Prepa
redStatementFactory.cs  246     6       IBatisNet.DataMapper
Warning 25      'System.Data.IDbDataParameter.Scale' is obsolete: 'Scale has
been deprecated.  Use the Math classes to explicitly set the scale of a
decimal.  http://go.microsoft.com/fwlink/?linkid=14202'
C:\dev\test\ibsvn\mapper\IBatisNet.DataMapper\Configuration\Statements\Prepa
redStatementFactory.cs  251     6       IBatisNet.DataMapper
Warning 26      'System.Data.IDbDataParameter.Precision' is obsolete:
'Precision has been deprecated.  Use the Math classes to explicitly set the
precision of a decimal.  http://go.microsoft.com/fwlink/?linkid=14202'
C:\dev\test\ibsvn\mapper\IBatisNet.DataMapper\Configuration\Statements\Prepa
redStatementFactory.cs  329     6       IBatisNet.DataMapper
Warning 27      'System.Data.IDbDataParameter.Scale' is obsolete: 'Scale has
been deprecated.  Use the Math classes to explicitly set the scale of a
decimal.  http://go.microsoft.com/fwlink/?linkid=14202'
C:\dev\test\ibsvn\mapper\IBatisNet.DataMapper\Configuration\Statements\Prepa
redStatementFactory.cs  334     6       IBatisNet.DataMapper
Warning 28      Possible unintended reference comparison; to get a value
comparison, cast the left hand side to type 'string'
C:\dev\test\ibsvn\mapper\IBatisNet.DataMapper\TypeHandlers\UnknownTypeHandle
r.cs    130     12      IBatisNet.DataMapper
Warning 29      The event
'IBatisNet.DataMapper.MappedStatements.CachingStatement.Execute' is never
used
C:\dev\test\ibsvn\mapper\IBatisNet.DataMapper\MappedStatements\CachingStatem
ent.cs  50      36      IBatisNet.DataMapper



-----Original Message-----
From: Ron Grabowski [mailto:[EMAIL PROTECTED] 
Sent: den 26 september 2005 15:19
To: [email protected]
Subject: RE: logging in ASP.NET 2.0

What methods were reported as being depreciated when you compiled in
2.0?

BuildDefaultLoggerFactoryAdapter() is in the SVN version of IBatisNet.
If you are using the version in SVN, you'll need to add some additional
code to your web.config:

<sectionGroup name="iBATIS">
<section name="logging"
type="IBatisNet.Common.Logging.ConfigurationSectionHandler,
IBatisNet.Common" />
</sectionGroup> 

<iBATIS>
<logging>
<logFactoryAdapter type="IBatisNet.Common.Logging.Impl.Log4NetLoggerFA,
IBatisNet.Common.Logging.Log4Net">
<arg key="configType" value="external" />
</logFactoryAdapter>
</logging>              
</iBATIS>

This file gives more detail on where those nodes need to be:

http://tinyurl.com/asj7m
http://svn.apache.org/repos/asf/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.
Test/bin/Debug/IBatisNet.DataMapper.Test.dll.config

--- Okku Touronen <[EMAIL PROTECTED]> wrote:

> Thanks for the answer, but I think I have fixed it or rather hacked
> it.
> 
> I think the problem is due to that I have compiled iBatis with v2.0
> of the
> .NET framework, and they have done something with the config stuff
> between
> 1.1 and 2.0, deprecated some methods.
> 
> Just to get the log up an running so I can continue with my project I
> changed the BuildDefaultLoggerFactoryAdapter() to return a log4net
> factory
> as default.
> 
> All works fine but I don't seem to get any result sets in my log? (as
> in
> iBatis for Java).
> 
> /Okku
> 
> -----Original Message-----
> From: Zarar Siddiqi [mailto:[EMAIL PROTECTED] 
> Sent: den 26 september 2005 14:54
> To: [email protected]
> Subject: Re: logging in ASP.NET 2.0
> 
> 
> Check the permissions for log.txt.  Maybe you should look at this
> thread:
> 
> http://www.mail-archive.com/[email protected]/msg00261.html 
> 
> or look at one of the many discussions on log4net:
> 
> http://www.mail-archive.com/[email protected]/
> 
> 
> >  -------Original Message-------
> >  From: Okku Touronen <[EMAIL PROTECTED]>
> >  Subject: logging in ASP.NET 2.0
> >  Sent: 26 Sep '05 04:10
> >  
> >  Hello, I have not succeeded to get any log output from iBatisin my
> ASP.NET
> >  2.0 applications.
> >  
> >  
> >  I use the log4net framework.
> >  
> >  My own logging statements are outputted. And when I run
> theapplication as
> >  a windows form application the iBatis log output works.
> >  
> >  I have the web.config set up as:
> >  
> >  
> >  <log4net>
> >  
> >  <!-- Define some output appenders -->
> >  
> >  <appender name="RollingLogFileAppender"
> >  type="log4net.Appender.RollingFileAppender">
> >  
> >  <param name="File" value="log.txt"/>
> >  
> >  <param name="AppendToFile" value="true"/>
> >  
> >  <param name="MaxSizeRollBackups" value="2"/>
> >  
> >  <param name="MaximumFileSize" value="110KB"/>
> >  
> >  <param name="RollingStyle" value="Size"/>
> >  
> >  <param name="StaticLogFileName" value="true"/>
> >  
> >  <layout type="log4net.Layout.PatternLayout">
> >  
> >  <param name="Header" value="[Header]\r\n"/>
> >  
> >  <param name="Footer" value="[Footer]\r\n"/>
> >  
> >  <param name="ConversionPattern" value="%d [%t]
> >  %-5p %c [%x] - %m%n"/>
> >  
> >  </layout>
> >  
> >  </appender>
> >  
> >  <appender name="ConsoleAppender"
> >  type="log4net.Appender.ConsoleAppender">
> >  
> >  <layout type="log4net.Layout.PatternLayout">
> >  
> >  <param name="ConversionPattern" value="%d [%t]
> >  %-5p %c [%x] <%X{auth}> - %m%n"/>
> >  
> >  </layout>
> >  
> >  </appender>
> >  
> >  <!-- OFF, FATAL, ERROR, WARN, INFO, DEBUG, ALL -->
> >  
> >  <!-- Set root logger level to ERROR and its appenders -->
> >  
> >  <root>
> >  
> >  <level value="ALL"/>
> >  
> >  <appender-ref ref="RollingLogFileAppender"/>
> >  
> >  <appender-ref ref="ConsoleAppender"/>
> >  
> >  </root>
> >  
> >  <!-- Print only messages of level DEBUG or above in
> &gt;  thepackages -->
> >  
> >  <logger
> >  name="IBatisNet.DataMapper.Commands.DefaultPreparedCommand">
> >  
> >  <level value="ALL"/>
> >  
> >  </logger>
> >  
> >  <logger
> >  name="IBatisNet.DataMapper.Configuration.Cache.CacheModel">
> >  
> >  <level value="ALL"/>
> >  
> >  </logger>
> >  
> >  <logger name="IBatisNet.DataMapper.LazyLoadList">
> >  
> >  <level value="ALL"/>
> >  
> >  </logger>
> >  
> >  <logger name="IBatisNet.DataMapper.SqlMapSession">
> >  
> >  <level value="ALL"/>
> >  
> >  </logger>
> >  
> >  <logger name="IBatisNet.Common.Transaction.TransactionScope">
> >  
> >  <level value="ALL"/>
> >  
> >  </logger>
> >  
> >  <logger name="IBatisNet.DataAccess.DaoSession">
> >  
> >  <level value="ALL"/>
> >  
> >  </logger>
> >  
> >  <logger name="IBatisNet.DataAccess.Configuration.DaoProxy">
> >  
> >  <level value="ALL"/>
> >  
> >  </logger>
> >  
> >  <logger
> >
>
name="IBatisNet.DataMapper.Configuration.Statements.PreparedStatementFactory
> ">
> >  
> >  <level value="ALL"/>
> >  
> >  </logger>
> >  
> >  <logger name="IBatisNet.DataMapper.Commands.IPreparedCommand">
> >  
> >  <level value="ALL"/>
> >  
> >  </logger>
> >  
> >  </log4net>
> >  
> >  
> >  Any clues anyone?
> >  
> >  
> >  Regards OkkuTouronen
> 
> 
> 
> 




Reply via email to