nicko       2004/12/19 11:23:00

  Modified:    src/Core LogImpl.cs
  Log:
  Updates suggested by FxCop.
  Minor naming changes to internal types.
  Perf improvements to type check + type cast code.
  
  Revision  Changes    Path
  1.9       +41 -15    logging-log4net/src/Core/LogImpl.cs
  
  Index: LogImpl.cs
  ===================================================================
  RCS file: /home/cvs/logging-log4net/src/Core/LogImpl.cs,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- LogImpl.cs        13 Dec 2004 01:42:50 -0000      1.8
  +++ LogImpl.cs        19 Dec 2004 19:23:00 -0000      1.9
  @@ -17,6 +17,7 @@
   #endregion
   
   using System;
  +using System.Globalization;
   
   using log4net.Repository;
   
  @@ -196,10 +197,15 @@
                /// <remarks>
                /// <para>
                /// The message is formatted using the <see 
cref="String.Format"/> method. See
  -             /// String.Format for details of the syntax of the format 
string and the behavior
  +             /// <c>String.Format</c> for details of the syntax of the 
format string and the behavior
                /// of the formatting.
                /// </para>
                /// <para>
  +             /// The string is formatted using the <see 
cref="CultureInfo.InvariantCulture"/>
  +             /// format provider. To specify a localized provider use the
  +             /// <see cref="DebugFormat(IFormatProvider,string,object[])"/> 
method.
  +             /// </para>
  +             /// <para>
                /// This method does not take an <see cref="Exception"/> object 
to include in the
                /// log event. To pass an <see cref="Exception"/> use one of 
the <see cref="Debug"/>
                /// methods instead.
  @@ -207,7 +213,7 @@
                /// </remarks>
                virtual public void DebugFormat(string format, params object[] 
args) 
                {
  -                     Logger.Log(ThisDeclaringType, m_levelDebug, 
String.Format(format, args), null);
  +                     Logger.Log(ThisDeclaringType, m_levelDebug, 
String.Format(CultureInfo.InvariantCulture, format, args), null);
                }
   
                /// <summary>
  @@ -219,7 +225,7 @@
                /// <remarks>
                /// <para>
                /// The message is formatted using the <see 
cref="String.Format"/> method. See
  -             /// String.Format for details of the syntax of the format 
string and the behavior
  +             /// <c>String.Format</c> for details of the syntax of the 
format string and the behavior
                /// of the formatting.
                /// </para>
                /// <para>
  @@ -290,10 +296,15 @@
                /// <remarks>
                /// <para>
                /// The message is formatted using the <see 
cref="String.Format"/> method. See
  -             /// String.Format for details of the syntax of the format 
string and the behavior
  +             /// <c>String.Format</c> for details of the syntax of the 
format string and the behavior
                /// of the formatting.
                /// </para>
                /// <para>
  +             /// The string is formatted using the <see 
cref="CultureInfo.InvariantCulture"/>
  +             /// format provider. To specify a localized provider use the
  +             /// <see cref="InfoFormat(IFormatProvider,string,object[])"/> 
method.
  +             /// </para>
  +             /// <para>
                /// This method does not take an <see cref="Exception"/> object 
to include in the
                /// log event. To pass an <see cref="Exception"/> use one of 
the <see cref="Info"/>
                /// methods instead.
  @@ -301,7 +312,7 @@
                /// </remarks>
                virtual public void InfoFormat(string format, params object[] 
args) 
                {
  -                     Logger.Log(ThisDeclaringType, m_levelInfo, 
String.Format(format, args), null);
  +                     Logger.Log(ThisDeclaringType, m_levelInfo, 
String.Format(CultureInfo.InvariantCulture, format, args), null);
                }
   
                /// <summary>
  @@ -313,7 +324,7 @@
                /// <remarks>
                /// <para>
                /// The message is formatted using the <see 
cref="String.Format"/> method. See
  -             /// String.Format for details of the syntax of the format 
string and the behavior
  +             /// <c>String.Format</c> for details of the syntax of the 
format string and the behavior
                /// of the formatting.
                /// </para>
                /// <para>
  @@ -384,10 +395,15 @@
                /// <remarks>
                /// <para>
                /// The message is formatted using the <see 
cref="String.Format"/> method. See
  -             /// String.Format for details of the syntax of the format 
string and the behavior
  +             /// <c>String.Format</c> for details of the syntax of the 
format string and the behavior
                /// of the formatting.
                /// </para>
                /// <para>
  +             /// The string is formatted using the <see 
cref="CultureInfo.InvariantCulture"/>
  +             /// format provider. To specify a localized provider use the
  +             /// <see cref="WarnFormat(IFormatProvider,string,object[])"/> 
method.
  +             /// </para>
  +             /// <para>
                /// This method does not take an <see cref="Exception"/> object 
to include in the
                /// log event. To pass an <see cref="Exception"/> use one of 
the <see cref="Warn"/>
                /// methods instead.
  @@ -395,7 +411,7 @@
                /// </remarks>
                virtual public void WarnFormat(string format, params object[] 
args) 
                {
  -                     Logger.Log(ThisDeclaringType, m_levelWarn, 
String.Format(format, args), null);
  +                     Logger.Log(ThisDeclaringType, m_levelWarn, 
String.Format(CultureInfo.InvariantCulture, format, args), null);
                }
   
                /// <summary>
  @@ -407,7 +423,7 @@
                /// <remarks>
                /// <para>
                /// The message is formatted using the <see 
cref="String.Format"/> method. See
  -             /// String.Format for details of the syntax of the format 
string and the behavior
  +             /// <c>String.Format</c> for details of the syntax of the 
format string and the behavior
                /// of the formatting.
                /// </para>
                /// <para>
  @@ -478,10 +494,15 @@
                /// <remarks>
                /// <para>
                /// The message is formatted using the <see 
cref="String.Format"/> method. See
  -             /// String.Format for details of the syntax of the format 
string and the behavior
  +             /// <c>String.Format</c> for details of the syntax of the 
format string and the behavior
                /// of the formatting.
                /// </para>
                /// <para>
  +             /// The string is formatted using the <see 
cref="CultureInfo.InvariantCulture"/>
  +             /// format provider. To specify a localized provider use the
  +             /// <see cref="ErrorFormat(IFormatProvider,string,object[])"/> 
method.
  +             /// </para>
  +             /// <para>
                /// This method does not take an <see cref="Exception"/> object 
to include in the
                /// log event. To pass an <see cref="Exception"/> use one of 
the <see cref="Error"/>
                /// methods instead.
  @@ -489,7 +510,7 @@
                /// </remarks>
                virtual public void ErrorFormat(string format, params object[] 
args) 
                {
  -                     Logger.Log(ThisDeclaringType, m_levelError, 
String.Format(format, args), null);
  +                     Logger.Log(ThisDeclaringType, m_levelError, 
String.Format(CultureInfo.InvariantCulture, format, args), null);
                }
   
                /// <summary>
  @@ -501,7 +522,7 @@
                /// <remarks>
                /// <para>
                /// The message is formatted using the <see 
cref="String.Format"/> method. See
  -             /// String.Format for details of the syntax of the format 
string and the behavior
  +             /// <c>String.Format</c> for details of the syntax of the 
format string and the behavior
                /// of the formatting.
                /// </para>
                /// <para>
  @@ -572,10 +593,15 @@
                /// <remarks>
                /// <para>
                /// The message is formatted using the <see 
cref="String.Format"/> method. See
  -             /// String.Format for details of the syntax of the format 
string and the behavior
  +             /// <c>String.Format</c> for details of the syntax of the 
format string and the behavior
                /// of the formatting.
                /// </para>
                /// <para>
  +             /// The string is formatted using the <see 
cref="CultureInfo.InvariantCulture"/>
  +             /// format provider. To specify a localized provider use the
  +             /// <see cref="FatalFormat(IFormatProvider,string,object[])"/> 
method.
  +             /// </para>
  +             /// <para>
                /// This method does not take an <see cref="Exception"/> object 
to include in the
                /// log event. To pass an <see cref="Exception"/> use one of 
the <see cref="Fatal"/>
                /// methods instead.
  @@ -583,7 +609,7 @@
                /// </remarks>
                virtual public void FatalFormat(string format, params object[] 
args) 
                {
  -                     Logger.Log(ThisDeclaringType, m_levelFatal, 
String.Format(format, args), null);
  +                     Logger.Log(ThisDeclaringType, m_levelFatal, 
String.Format(CultureInfo.InvariantCulture, format, args), null);
                }
   
                /// <summary>
  @@ -595,7 +621,7 @@
                /// <remarks>
                /// <para>
                /// The message is formatted using the <see 
cref="String.Format"/> method. See
  -             /// String.Format for details of the syntax of the format 
string and the behavior
  +             /// <c>String.Format</c> for details of the syntax of the 
format string and the behavior
                /// of the formatting.
                /// </para>
                /// <para>
  
  
  

Reply via email to