Added quick format versions of the Log message methods.
This commit is contained in:
parent
12031e804c
commit
dcfdbd1dbd
1 changed files with 70 additions and 0 deletions
|
|
@ -70,6 +70,16 @@ namespace TShockAPI
|
|||
public static void Data(String message)
|
||||
{
|
||||
Write(message, LogLevel.Data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes data to the log file.
|
||||
/// </summary>
|
||||
/// <param name="format">The format of the message to be written.</param>
|
||||
/// <param name="args">The format arguments.</param>
|
||||
public static void Data(String format, params String[] args)
|
||||
{
|
||||
Data(String.Format(format, args));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -79,6 +89,16 @@ namespace TShockAPI
|
|||
public static void Error(String message)
|
||||
{
|
||||
Write(message, LogLevel.Error);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes an error to the log file.
|
||||
/// </summary>
|
||||
/// <param name="format">The format of the message to be written.</param>
|
||||
/// <param name="args">The format arguments.</param>
|
||||
public static void Error(String format, params String[] args)
|
||||
{
|
||||
Error(String.Format(format, args));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -91,6 +111,16 @@ namespace TShockAPI
|
|||
Console.WriteLine(message);
|
||||
Console.ForegroundColor = ConsoleColor.Gray;
|
||||
Write(message, LogLevel.Error);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes an error to the log file.
|
||||
/// </summary>
|
||||
/// <param name="format">The format of the message to be written.</param>
|
||||
/// <param name="args">The format arguments.</param>
|
||||
public static void ConsoleError(String format, params String[] args)
|
||||
{
|
||||
ConsoleError(String.Format(format, args));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -100,6 +130,16 @@ namespace TShockAPI
|
|||
public static void Warn(String message)
|
||||
{
|
||||
Write(message, LogLevel.Warning);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes a warning to the log file.
|
||||
/// </summary>
|
||||
/// <param name="format">The format of the message to be written.</param>
|
||||
/// <param name="args">The format arguments.</param>
|
||||
public static void Warn(String format, params String[] args)
|
||||
{
|
||||
Warn(String.Format(format, args));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -109,6 +149,16 @@ namespace TShockAPI
|
|||
public static void Info(String message)
|
||||
{
|
||||
Write(message, LogLevel.Info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes an informative string to the log file.
|
||||
/// </summary>
|
||||
/// <param name="format">The format of the message to be written.</param>
|
||||
/// <param name="args">The format arguments.</param>
|
||||
public static void Info(String format, params String[] args)
|
||||
{
|
||||
Info(String.Format(format, args));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -121,6 +171,16 @@ namespace TShockAPI
|
|||
Console.WriteLine(message);
|
||||
Console.ForegroundColor = ConsoleColor.Gray;
|
||||
Write(message, LogLevel.Info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes an informative string to the log file. Also outputs to the console.
|
||||
/// </summary>
|
||||
/// <param name="format">The format of the message to be written.</param>
|
||||
/// <param name="args">The format arguments.</param>
|
||||
public static void ConsoleInfo(String format, params String[] args)
|
||||
{
|
||||
ConsoleInfo(String.Format(format, args));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -130,6 +190,16 @@ namespace TShockAPI
|
|||
public static void Debug(String message)
|
||||
{
|
||||
Write(message, LogLevel.Debug);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes a debug string to the log file.
|
||||
/// </summary>
|
||||
/// <param name="format">The format of the message to be written.</param>
|
||||
/// <param name="args">The format arguments.</param>
|
||||
public static void Debug(String format, params String[] args)
|
||||
{
|
||||
Debug(String.Format(format, args));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue