mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[Logger] Add params overrides
This commit is contained in:
@@ -250,6 +250,17 @@ namespace SabreTools.Library
|
||||
return Log(output, LogLevel.VERBOSE, appendPrefix);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write the given string as a verbose message to the log output
|
||||
/// </summary>
|
||||
/// <param name="output">String to be written log</param>
|
||||
/// <param name="args">Optional arguments for string formatting</param>
|
||||
/// <returns>True if the output could be written, false otherwise</returns>s
|
||||
public bool Verbose(string output, params object[] args)
|
||||
{
|
||||
return Log(string.Format(output, args), LogLevel.VERBOSE, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write the given string as a user message to the log output
|
||||
/// </summary>
|
||||
@@ -261,6 +272,17 @@ namespace SabreTools.Library
|
||||
return Log(output, LogLevel.USER, appendPrefix);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write the given string as a user message to the log output
|
||||
/// </summary>
|
||||
/// <param name="output">String to be written log</param>
|
||||
/// <param name="args">Optional arguments for string formatting</param>
|
||||
/// <returns>True if the output could be written, false otherwise</returns>
|
||||
public bool User(string output, params object[] args)
|
||||
{
|
||||
return Log(string.Format(output, args), LogLevel.USER, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write the given string as a warning to the log output
|
||||
/// </summary>
|
||||
@@ -273,6 +295,18 @@ namespace SabreTools.Library
|
||||
return Log(output, LogLevel.WARNING, appendPrefix);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write the given string as a warning to the log output
|
||||
/// </summary>
|
||||
/// <param name="output">String to be written log</param>
|
||||
/// <param name="args">Optional arguments for string formatting</param>
|
||||
/// <returns>True if the output could be written, false otherwise</returns>
|
||||
public bool Warning(string output, params object[] args)
|
||||
{
|
||||
_warnings = true;
|
||||
return Log(string.Format(output, args), LogLevel.WARNING, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes the given string as an error in the log
|
||||
/// </summary>
|
||||
@@ -285,6 +319,18 @@ namespace SabreTools.Library
|
||||
return Log(output, LogLevel.ERROR, appendPrefix);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes the given string as an error in the log
|
||||
/// </summary>
|
||||
/// <param name="output">String to be written log</param>
|
||||
/// <param name="args">Optional arguments for string formatting</param>
|
||||
/// <returns>True if the output could be written, false otherwise</returns>
|
||||
public bool Error(string output, params object[] args)
|
||||
{
|
||||
_errors = true;
|
||||
return Log(string.Format(output, args), LogLevel.ERROR, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clear lines beneath the given line in the console
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user