log.DebugFormat("Hello {0}! Where is {1}?", "Morten");
109 [10] DEBUG WindowsApplication1.Program (null) - Hello {0}! Where is {1}?
arg0: Morten
LogImpl.cs
virtual public void DebugFormat(string format, params object[]
args)
{
if (IsDebugEnabled)
{
try
{
Logger.Log(ThisDeclaringType, m_levelDebug,
String.Format(CultureInfo.InvariantCulture, format, args), null);
}
catch (FormatException)
{
System.Text.StringBuilder debug = new
System.Text.StringBuilder(format);
if (args != null && args.Length > 0)
{
debug.AppendLine();
for (int i = 0; i < args.Length; i++)
{
debug.AppendFormat("arg{0}: {1} ", i, args[i]);
}
}
Debug(debug.ToString());
}
}
}