Author: gbayon
Date: Wed Jan  3 11:36:11 2007
New Revision: 492266

URL: http://svn.apache.org/viewvc?view=rev&rev=492266
Log:
- Added log for cache

Modified:
    ibatis/trunk/cs/mapper/IBatisNet.DataAccess/IBatisNet.DataAccess.2005.csproj
    
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/IBatisNet.DataMapper.Test.dll.config
    
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Cache/CacheModel.cs

Modified: 
ibatis/trunk/cs/mapper/IBatisNet.DataAccess/IBatisNet.DataAccess.2005.csproj
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataAccess/IBatisNet.DataAccess.2005.csproj?view=diff&rev=492266&r1=492265&r2=492266
==============================================================================
--- 
ibatis/trunk/cs/mapper/IBatisNet.DataAccess/IBatisNet.DataAccess.2005.csproj 
(original)
+++ 
ibatis/trunk/cs/mapper/IBatisNet.DataAccess/IBatisNet.DataAccess.2005.csproj 
Wed Jan  3 11:36:11 2007
@@ -155,7 +155,9 @@
     <Compile Include="SessionStore\SessionStoreFactory .cs" />
     <Compile Include="SessionStore\WebSessionStore.cs" />
     <Content Include="ChangeLog.txt" />
-    <EmbeddedResource Include="DaoConfig.xsd" />
+    <EmbeddedResource Include="DaoConfig.xsd">
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
     <Content Include="licence.txt" />
     <Content Include="notice.txt" />
     <None Include="IBatisNet.DataAccess.build" />

Modified: 
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/IBatisNet.DataMapper.Test.dll.config
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/IBatisNet.DataMapper.Test.dll.config?view=diff&rev=492266&r1=492265&r2=492266
==============================================================================
--- 
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/IBatisNet.DataMapper.Test.dll.config
 (original)
+++ 
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/IBatisNet.DataMapper.Test.dll.config
 Wed Jan  3 11:36:11 2007
@@ -31,20 +31,20 @@
        <iBATIS>
                <logging>
 
-<!--           <logFactoryAdapter 
type="IBatisNet.Common.Logging.Impl.ConsoleOutLoggerFA, IBatisNet.Common">
+       <logFactoryAdapter 
type="IBatisNet.Common.Logging.Impl.ConsoleOutLoggerFA, IBatisNet.Common">
                                <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>    
- --> <!--
+ <!--
       <logFactoryAdapter type="IBatisNet.Common.Logging.Impl.Log4NetLoggerFA, 
IBatisNet.Common.Logging.Log4Net">
         <arg key="configType" value="inline" />
       </logFactoryAdapter> 
 -->
-    
+<!--      
      <logFactoryAdapter type="IBatisNet.Common.Logging.Impl.NoOpLoggerFA, 
IBatisNet.Common" />
-
+ -->
       
                </logging>
        </iBATIS>
@@ -113,7 +113,10 @@
                </logger>
     <logger name="IBatisNet.Common.Utilities.ConfigWatcherHandler">
       <level value="DEBUG" />
-    </logger>    
+    </logger>
+    <logger name="IBatisNet.DataMapper.Configuration.Cache.CacheModel">
+      <level value="DEBUG" />
+    </logger>
        </log4net>
        
 </configuration>

Modified: 
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Cache/CacheModel.cs
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Cache/CacheModel.cs?view=diff&rev=492266&r1=492265&r2=492266
==============================================================================
--- 
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Cache/CacheModel.cs 
(original)
+++ 
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Cache/CacheModel.cs 
Wed Jan  3 11:36:11 2007
@@ -322,6 +322,18 @@
                                                _hits++;
                                        }
                                }
+
+                if (_logger.IsDebugEnabled)
+                {
+                    if (value != null)
+                    {
+                        _logger.Debug(String.Format("Retrieved cached object 
'{0}' using key '{1}' ", value, key));
+                    }
+                    else
+                    {
+                        _logger.Debug(String.Format("Cache miss using key 
'{0}' ", key));
+                    }
+                }
                                return value;
                        }
                        set
@@ -342,6 +354,10 @@
                                        }
                                }
                                _controller[key] = value;
+                if (_logger.IsDebugEnabled)
+                {
+                    _logger.Debug(String.Format("Cache object '{0}' using key 
'{1}' ", value, key));
+                }
                        }
                }
 


Reply via email to