What version of the MyBatis.NET are you using? ibatis.datamapper.1.6.2. VS 2008
Please describe the problem. Unit tests are best! Iam new to Ibatis.... Log file is not created at all after trying all the tricks...what am i doing wrong?
assemble.info file is in properties folder web.config,log4net.config: in main project folder
Assembly.info file has: [assembly: log4net.Config.XmlConfiguratorAttribute(ConfigFile = "log4net.config", Watch = true)]
Web.config file <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="FILE-WATCH" /> <arg key="configFile" value="log4net.config" /> </logFactoryAdapter> </logging> </iBATIS>
finally log4net.config has <configSections> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /> </configSections>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"> <file value="Estatlog.txt" /> <appendToFile value="true" /> <maximumFileSize value="5MB" /> <maxSizeRollBackups value="-1" /> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%5level [%date] %-40.40logger{2} %message%newline" /> </layout> </appender> <root> <level value="ERROR" /> <appender-ref ref="RollingLogFileAppender" /> <appender-ref ref="ConsoleAppender" /> </root>
<!-- Print only messages of level DEBUG or above in the packages -->
<logger name="IBatisNet.DataMapper.Commands.DefaultPreparedCommand">
<level value="ALL" />
</logger>
<logger name="IBatisNet.DataMapper.Configuration.Cache.CacheModel">
<level value="ALL" />
</logger>
What is the expected output? What do you see instead? a Estatlog.txt log file created in the project folder
Please provide any additional information below.
y
Comment #1
Posted on Jun 8, 2012 by Grumpy HorseAny update on this.I am also getting same issue.
Comment #2
Posted on Jun 23, 2014 by Happy KangarooI experienced the same problem. andI was so resolved. log4net.dll down grade. log4net 1.2.13.0 > log4net 1.2.10.0
Status: New
Labels:
Type-Defect
Priority-Low