Author: nicko
Date: Thu Mar 30 02:58:55 2006
New Revision: 390080
URL: http://svn.apache.org/viewcvs?rev=390080&view=rev
Log:
Updated extensions to implement the new Format methods of
the ILog interface.
Modified:
logging/log4net/trunk/extensions/net/1.0/log4net.Ext.Marshal
ByRef/cs/src/MarshalByRefLogImpl.cs
logging/log4net/trunk/extensions/net/1.0/log4net.Ext.Trace/c
s/src/TraceLogImpl.cs
Modified:
logging/log4net/trunk/extensions/net/1.0/log4net.Ext.Marshal
ByRef/cs/src/MarshalByRefLogImpl.cs
URL: http://svn.apache.org/viewcvs/logging/log4net/trunk/ex
tensions/net/1.0/log4net.Ext.MarshalByRef/cs/src/MarshalByRe
fLogImpl.cs?rev=390080&r1=390079&r2=390080&view=
diff
============================================================
==================
---
logging/log4net/trunk/extensions/net/1.0/log4net.Ext.Marshal
ByRef/cs/src/MarshalByRefLogImpl.cs (original)
+++
logging/log4net/trunk/extensions/net/1.0/log4net.Ext.Marshal
ByRef/cs/src/MarshalByRefLogImpl.cs Thu Mar 30 02:58:55 2006
 -17,8
+17,11 
#endregion
using System;
+using System.Globalization;
+
using log4net.Core;
using log4net.Repository;
+using log4net.Util;
namespace log4net.Ext.MarshalByRef
{
 -90,12
+93,42 
public void DebugFormat(string format, params object[]
args)
{
- Logger.Log(ThisDeclaringType, m_levelDebug,
String.Format(format, args), null);
+ if (IsDebugEnabled)
+ {
+ Logger.Log(ThisDeclaringType, m_levelDebug, new
SystemStringFormat(CultureInfo.InvariantCulture, format,
args), null);
+ }
+ }
+
+ public void DebugFormat(string format, object arg0)
+ {
+ if (IsDebugEnabled)
+ {
+ Logger.Log(ThisDeclaringType, m_levelDebug, new
SystemStringFormat(CultureInfo.InvariantCulture, format, new
object[] ), null);
+ }
+ }
+
+ public void DebugFormat(string format, object arg0,
object arg1)
+ {
+ if (IsDebugEnabled)
+ {
+ Logger.Log(ThisDeclaringType, m_levelDebug, new
SystemStringFormat(CultureInfo.InvariantCulture, format, new
object[] { arg0, arg1 }), null);
+ }
+ }
+
+ public void DebugFormat(string format, object arg0,
object arg1, object arg2)
+ {
+ if (IsDebugEnabled)
+ {
+ Logger.Log(ThisDeclaringType, m_levelDebug, new
SystemStringFormat(CultureInfo.InvariantCulture, format, new
object[] { arg0, arg1, arg2 }), null);
+ }
}
public void DebugFormat(IFormatProvider provider, string
format, params object[] args)
{
- Logger.Log(ThisDeclaringType, m_levelDebug,
String.Format(provider, format, args), null);
+ if (IsDebugEnabled)
+ {
+ Logger.Log(ThisDeclaringType, m_levelDebug, new
SystemStringFormat(provider, format, args), null);
+ }
}
public void Info(object message)
 -110,12
+143,42 
public void InfoFormat(string format, params object[]
args)
{
- Logger.Log(ThisDeclaringType, m_levelInfo,
String.Format(format, args), null);
+ if (IsInfoEnabled)
+ {
+ Logger.Log(ThisDeclaringType, m_levelInfo, new
SystemStringFormat(CultureInfo.InvariantCulture, format,
args), null);
+ }
+ }
+
+ public void InfoFormat(string format, object arg0)
+ {
+ if (IsInfoEnabled)
+ {
+ Logger.Log(ThisDeclaringType, m_levelInfo, new
SystemStringFormat(CultureInfo.InvariantCulture, format, new
object[] ), null);
+ }
+ }
+
+ public void InfoFormat(string format, object arg0, object
arg1)
+ {
+ if (IsInfoEnabled)
+ {
+ Logger.Log(ThisDeclaringType, m_levelInfo, new
SystemStringFormat(CultureInfo.InvariantCulture, format, new
object[] { arg0, arg1 }), null);
+ }
+ }
+
+ public void InfoFormat(string format, object arg0, object
arg1, object arg2)
+ {
+ if (IsInfoEnabled)
+ {
+ Logger.Log(ThisDeclaringType, m_levelInfo, new
SystemStringFormat(CultureInfo.InvariantCulture, format, new
object[] { arg0, arg1, arg2 }), null);
+ }
}
public void InfoFormat(IFormatProvider provider, string
format, params object[] args)
{
- Logger.Log(ThisDeclaringType, m_levelInfo,
String.Format(provider, format, args), null);
+ if (IsInfoEnabled)
+ {
+ Logger.Log(ThisDeclaringType, m_levelInfo, new
SystemStringFormat(provider, format, args), null);
+ }
}
public void Warn(object message)
 -130,12
+193,42 
public void WarnFormat(string format, params object[]
args)
{
- Logger.Log(ThisDeclaringType, m_levelWarn,
String.Format(format, args), null);
+ if (IsWarnEnabled)
+ {
+ Logger.Log(ThisDeclaringType, m_levelWarn, new
SystemStringFormat(CultureInfo.InvariantCulture, format,
args), null);
+ }
+ }
+
+ public void WarnFormat(string format, object arg0)
+ {
+ if (IsWarnEnabled)
+ {
+ Logger.Log(ThisDeclaringType, m_levelWarn, new
SystemStringFormat(CultureInfo.InvariantCulture, format, new
object[] ), null);
+ }
+ }
+
+ public void WarnFormat(string format, object arg0, object
arg1)
+ {
+ if (IsWarnEnabled)
+ {
+ Logger.Log(ThisDeclaringType, m_levelWarn, new
SystemStringFormat(CultureInfo.InvariantCulture, format, new
object[] { arg0, arg1 }), null);
+ }
+ }
+
+ public void WarnFormat(string format, object arg0, object
arg1, object arg2)
+ {
+ if (IsWarnEnabled)
+ {
+ Logger.Log(ThisDeclaringType, m_levelWarn, new
SystemStringFormat(CultureInfo.InvariantCulture, format, new
object[] { arg0, arg1, arg2 }), null);
+ }
}
public void WarnFormat(IFormatProvider provider, string
format, params object[] args)
{
- Logger.Log(ThisDeclaringType, m_levelWarn,
String.Format(provider, format, args), null);
+ if (IsWarnEnabled)
+ {
+ Logger.Log(ThisDeclaringType, m_levelWarn, new
SystemStringFormat(provider, format, args), null);
+ }
}
public void Error(object message)
 -150,12
+243,42 
public void ErrorFormat(string format, params object[]
args)
{
- Logger.Log(ThisDeclaringType, m_levelError,
String.Format(format, args), null);
+ if (IsErrorEnabled)
+ {
+ Logger.Log(ThisDeclaringType, m_levelError, new
SystemStringFormat(CultureInfo.InvariantCulture, format,
args), null);
+ }
+ }
+
+ public void ErrorFormat(string format, object arg0)
+ {
+ if (IsErrorEnabled)
+ {
+ Logger.Log(ThisDeclaringType, m_levelError, new
SystemStringFormat(CultureInfo.InvariantCulture, format, new
object[] ), null);
+ }
+ }
+
+ public void ErrorFormat(string format, object arg0,
object arg1)
+ {
+ if (IsErrorEnabled)
+ {
+ Logger.Log(ThisDeclaringType, m_levelError, new
SystemStringFormat(CultureInfo.InvariantCulture, format, new
object[] { arg0, arg1 }), null);
+ }
+ }
+
+ public void ErrorFormat(string format, object arg0,
object arg1, object arg2)
+ {
+ if (IsErrorEnabled)
+ {
+ Logger.Log(ThisDeclaringType, m_levelError, new
SystemStringFormat(CultureInfo.InvariantCulture, format, new
object[] { arg0, arg1, arg2 }), null);
+ }
}
public void ErrorFormat(IFormatProvider provider, string
format, params object[] args)
{
- Logger.Log(ThisDeclaringType, m_levelError,
String.Format(provider, format, args), null);
+ if (IsErrorEnabled)
+ {
+ Logger.Log(ThisDeclaringType, m_levelError, new
SystemStringFormat(provider, format, args), null);
+ }
}
public void Fatal(object message)
 -170,12
+293,42 
public void FatalFormat(string format, params object[]
args)
{
- Logger.Log(ThisDeclaringType, m_levelFatal,
String.Format(format, args), null);
+ if (IsFatalEnabled)
+ {
+ Logger.Log(ThisDeclaringType, m_levelFatal, new
SystemStringFormat(CultureInfo.InvariantCulture, format,
args), null);
+ }
+ }
+
+ public void FatalFormat(string format, object arg0)
+ {
+ if (IsFatalEnabled)
+ {
+ Logger.Log(ThisDeclaringType, m_levelFatal, new
SystemStringFormat(CultureInfo.InvariantCulture, format, new
object[] ), null);
+ }
+ }
+
+ public void FatalFormat(string format, object arg0,
object arg1)
+ {
+ if (IsFatalEnabled)
+ {
+ Logger.Log(ThisDeclaringType, m_levelFatal, new
SystemStringFormat(CultureInfo.InvariantCulture, format, new
object[] { arg0, arg1 }), null);
+ }
+ }
+
+ public void FatalFormat(string format, object arg0,
object arg1, object arg2)
+ {
+ if (IsFatalEnabled)
+ {
+ Logger.Log(ThisDeclaringType, m_levelFatal, new
SystemStringFormat(CultureInfo.InvariantCulture, format, new
object[] { arg0, arg1, arg2 }), null);
+ }
}
public void FatalFormat(IFormatProvider provider, string
format, params object[] args)
{
- Logger.Log(ThisDeclaringType, m_levelFatal,
String.Format(provider, format, args), null);
+ if (IsFatalEnabled)
+ {
+ Logger.Log(ThisDeclaringType, m_levelFatal, new
SystemStringFormat(provider, format, args), null);
+ }
}
public bool IsDebugEnabled
Modified:
logging/log4net/trunk/extensions/net/1.0/log4net.Ext.Trace/c
s/src/TraceLogImpl.cs
URL: http://s
vn.apache.org/viewcvs/logging/log4net/trunk/extensions/net/1
.0/log4net.Ext.Trace/cs/src/TraceLogImpl.cs?rev=390080&r
1=390079&r2=390080&view=diff
============================================================
==================
---
logging/log4net/trunk/extensions/net/1.0/log4net.Ext.Trace/c
s/src/TraceLogImpl.cs (original)
+++
logging/log4net/trunk/extensions/net/1.0/log4net.Ext.Trace/c
s/src/TraceLogImpl.cs Thu Mar 30 02:58:55 2006
 -72,7
+72,7 
{
if (IsTraceEnabled)
{
- Logger.Log(ThisDeclaringType, m_levelTrace,
Transform.StringFormat(CultureInfo.InvariantCulture, format,
args), null);
+ Logger.Log(ThisDeclaringType, m_levelTrace, new
SystemStringFormat(CultureInfo.InvariantCulture, format,
args), null);
}
}
 -80,7
+80,7 
{
if (IsTraceEnabled)
{
- Logger.Log(ThisDeclaringType, m_levelTrace,
Transform.StringFormat(provider, format, args), null);
+ Logger.Log(ThisDeclaringType, m_levelTrace, new
SystemStringFormat(provider, format, args), null);
}
}
|