You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ibatis.apache.org by rg...@apache.org on 2005/09/22 06:18:54 UTC

svn commit: r290885 - in /ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net: LocationInfoLog4NetLogger.cs Log4NetLoggerFA.cs

Author: rgrabowski
Date: Wed Sep 21 21:18:26 2005
New Revision: 290885

URL: http://svn.apache.org/viewcvs?rev=290885&view=rev
Log:
Realized I don't really need to do IsXXXXXEnabled checks because I don't need to protect myself from things like String.Format

Modified:
    ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/LocationInfoLog4NetLogger.cs
    ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLoggerFA.cs

Modified: ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/LocationInfoLog4NetLogger.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/LocationInfoLog4NetLogger.cs?rev=290885&r1=290884&r2=290885&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/LocationInfoLog4NetLogger.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/LocationInfoLog4NetLogger.cs Wed Sep 21 21:18:26 2005
@@ -120,10 +120,7 @@
 		/// <param name="e"></param>
 		public void Info(object message, Exception e)
 		{
-			if (_log.IsInfoEnabled)
-			{
-				_log.Logger.Log(declaringType, Level.Info, message, e);
-			}
+			_log.Logger.Log(declaringType, Level.Info, message, e);
 		}
 
 		/// <summary>
@@ -132,10 +129,7 @@
 		/// <param name="message"></param>
 		public void Info(object message)
 		{
-			if (_log.IsInfoEnabled)
-			{
-				_log.Logger.Log(declaringType, Level.Info, message, null);
-			}
+			_log.Logger.Log(declaringType, Level.Info, message, null);
 		}
 
 		/// <summary>
@@ -145,10 +139,7 @@
 		/// <param name="e"></param>
 		public void Debug(object message, Exception e)
 		{
-			if (_log.IsDebugEnabled)
-			{
-				_log.Logger.Log(declaringType, Level.Debug, message, e);
-			}
+			_log.Logger.Log(declaringType, Level.Debug, message, e);
 		}
 
 		/// <summary>
@@ -157,13 +148,9 @@
 		/// <param name="message"></param>
 		public void Debug(object message)
 		{
-			if (_log.IsDebugEnabled)
-			{
-				_log.Logger.Log(declaringType, Level.Debug, message, null);
-			}
+			_log.Logger.Log(declaringType, Level.Debug, message, null);
 		}
 
-
 		/// <summary>
 		/// 
 		/// </summary>
@@ -171,10 +158,7 @@
 		/// <param name="e"></param>
 		public void Warn(object message, Exception e)
 		{
-			if (_log.IsWarnEnabled)
-			{
-				_log.Logger.Log(declaringType, Level.Warn, message, e);
-			}
+			_log.Logger.Log(declaringType, Level.Warn, message, e);
 		}
 
 		/// <summary>
@@ -183,13 +167,9 @@
 		/// <param name="message"></param>
 		public void Warn(object message)
 		{
-			if (_log.IsWarnEnabled)
-			{
-				_log.Logger.Log(declaringType, Level.Warn, message, null);
-			}
+			_log.Logger.Log(declaringType, Level.Warn, message, null);
 		}
 
-
 		/// <summary>
 		/// 
 		/// </summary>
@@ -197,11 +177,7 @@
 		/// <param name="e"></param>
 		public void Trace(object message, Exception e)
 		{
-			// is calling through to _log.Logger slow ???
-			if (_log.Logger.IsEnabledFor(Level.Trace))
-			{
-				_log.Logger.Log(declaringType, Level.Trace, message, e);
-			}
+			_log.Logger.Log(declaringType, Level.Trace, message, e);
 		}
 
 		/// <summary>
@@ -210,11 +186,7 @@
 		/// <param name="message"></param>
 		public void Trace(object message)
 		{
-			// is calling through to _log.Logger slow ???
-			if (_log.Logger.IsEnabledFor(Level.Trace))
-			{
-				_log.Logger.Log(declaringType, Level.Info, message, null);
-			}
+			_log.Logger.Log(declaringType, Level.Trace, message, null);
 		}
 
 		/// <summary>
@@ -224,10 +196,7 @@
 		/// <param name="e"></param>
 		public void Fatal(object message, Exception e)
 		{
-			if (_log.IsFatalEnabled)
-			{
-				_log.Logger.Log(declaringType, Level.Fatal, message, e);
-			}
+			_log.Logger.Log(declaringType, Level.Fatal, message, e);
 		}
 
 		/// <summary>
@@ -236,10 +205,7 @@
 		/// <param name="message"></param>
 		public void Fatal(object message)
 		{
-			if (_log.IsFatalEnabled)
-			{
-				_log.Logger.Log(declaringType, Level.Fatal, message, null);
-			}
+			_log.Logger.Log(declaringType, Level.Fatal, message, null);
 		}
 
 		/// <summary>
@@ -249,10 +215,7 @@
 		/// <param name="e"></param>
 		public void Error(object message, Exception e)
 		{
-			if (_log.IsErrorEnabled)
-			{
-				_log.Logger.Log(declaringType, Level.Error, message, e);
-			}
+			_log.Logger.Log(declaringType, Level.Error, message, e);
 		}
 
 		/// <summary>
@@ -261,10 +224,7 @@
 		/// <param name="message"></param>
 		public void Error(object message)
 		{
-			if (_log.IsErrorEnabled)
-			{
-				_log.Logger.Log(declaringType, Level.Error, message, null);
-			}
+			_log.Logger.Log(declaringType, Level.Error, message, null);
 		}
 
 		#endregion

Modified: ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLoggerFA.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLoggerFA.cs?rev=290885&r1=290884&r2=290885&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLoggerFA.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLoggerFA.cs Wed Sep 21 21:18:26 2005
@@ -38,7 +38,7 @@
 namespace IBatisNet.Common.Logging.Impl
 {
 	/// <summary>
-	/// Concrete subclass of ILoggerFactoryAdapter specific to log4n. 
+	/// Concrete subclass of ILoggerFactoryAdapter specific to log4net.
 	/// </summary>
 	public class Log4NetLoggerFA : ILoggerFactoryAdapter
 	{