Commit ec3ccee3 authored by Ghislain MARY's avatar Ghislain MARY

Add some methods to the Logger to output messages given a format and some arguments.

parent b2de87e9
......@@ -59,6 +59,16 @@ namespace Linphone.Model
Logger.Instance.Write(OutputTraceLevel.Debug, msg);
}
/// <summary>
/// Write a debug message with a format and some arguments
/// </summary>
/// <param name="fmt">The format of the message to be written</param>
/// <param name="args">The arguments to fill the format with</param>
public static void Dbg(String fmt, params object[] args)
{
Logger.Instance.Write(OutputTraceLevel.Debug, String.Format(fmt, args));
}
/// <summary>
/// Write a standard message
/// </summary>
......@@ -68,6 +78,16 @@ namespace Linphone.Model
Logger.Instance.Write(OutputTraceLevel.Message, msg);
}
/// <summary>
/// Write a standard message with a format and some arguments
/// </summary>
/// <param name="fmt">The format of the message to be written</param>
/// <param name="args">The arguments to fill the format with</param>
public static void Msg(String fmt, params object[] args)
{
Logger.Instance.Write(OutputTraceLevel.Message, String.Format(fmt, args));
}
/// <summary>
/// Write a warning message
/// </summary>
......@@ -77,6 +97,16 @@ namespace Linphone.Model
Logger.Instance.Write(OutputTraceLevel.Warning, msg);
}
/// <summary>
/// Write a warning message with a format and some arguments
/// </summary>
/// <param name="fmt">The format of the message to be written</param>
/// <param name="args">The arguments to fill the format with</param>
public static void Warn(String fmt, params object[] args)
{
Logger.Instance.Write(OutputTraceLevel.Warning, String.Format(fmt, args));
}
/// <summary>
/// Write an error message
/// </summary>
......@@ -85,5 +115,15 @@ namespace Linphone.Model
{
Logger.Instance.Write(OutputTraceLevel.Error, msg);
}
/// <summary>
/// Write an error message with a format and some arguments
/// </summary>
/// <param name="fmt">The format of the message to be written</param>
/// <param name="args">The arguments to fill the format with</param>
public static void Err(String fmt, params object[] args)
{
Logger.Instance.Write(OutputTraceLevel.Error, String.Format(fmt, args));
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment