Sebastien Lucas wrote:
I followed the documentation : I created a .config file and copy/paste the pdf example.

The log should be log.txt and It's never generated.

I'm not an expert in this but I think you should provide your own configuration file. IBatis messages will flow, but I guess all of them are at the "DEBUG" level, so you won't see them unless you provide the correct filtering (in my configuration file below, you should change "INFO" to "DEBUG").


There are surely more smart ways to handle all this, but this has been working okay for me. I'm using iBatis 1.1 under .NET.

To load my configuration file (log4net.config), I simply use:

log4net.Config.DOMConfigurator.Configure(new System.IO.FileInfo("log4net.config"));

Hope it helps, at least for testing.

See you,

Pablo.




Here is my example log4net.config file (remember to change "INFO" to "DEBUG").
<log4net>
        <root>
                <level value="INFO" />
                <appender-ref ref="LogFile" />
        </root>
        
        <appender name="LogFile" type="log4net.Appender.RollingFileAppender" >

                <file value="TecAccessControl.log.txt" />

                <appendToFile value="true" />

                <rollingStyle value="Size" />
                
                <maximumFileSize value="1000KB" />

                <maxSizeRollBackups value="5" />

                <layout type="log4net.Layout.PatternLayout">
                        <param name="ConversionPattern" value="%d %-5p %c - %m%n" 
/>
                </layout>

         </appender>

</log4net>

Reply via email to