mirror of
https://github.com/Sanae6/SmoOnlineServer.git
synced 2024-11-25 04:35:18 +00:00
Use Write instead of WriteLine for logging
This commit is contained in:
parent
ab318db1b8
commit
6a63eb47c2
1 changed files with 4 additions and 4 deletions
|
@ -11,22 +11,22 @@ public class Logger {
|
||||||
|
|
||||||
public void Info(string text) {
|
public void Info(string text) {
|
||||||
Console.ResetColor();
|
Console.ResetColor();
|
||||||
Console.WriteLine(PrefixNewLines(text, $"Info [{Name}]"));
|
Console.Write(PrefixNewLines(text, $"Info [{Name}]"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Warn(string text) {
|
public void Warn(string text) {
|
||||||
Console.ForegroundColor = ConsoleColor.Yellow;
|
Console.ForegroundColor = ConsoleColor.Yellow;
|
||||||
Console.WriteLine(PrefixNewLines(text, $"Warn [{Name}]"));
|
Console.Write(PrefixNewLines(text, $"Warn [{Name}]"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Error(string text) {
|
public void Error(string text) {
|
||||||
Console.ForegroundColor = ConsoleColor.Red;
|
Console.ForegroundColor = ConsoleColor.Red;
|
||||||
Console.WriteLine(PrefixNewLines(text, $"Error [{Name}]"));
|
Console.Write(PrefixNewLines(text, $"Error [{Name}]"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Error(Exception error) {
|
public void Error(Exception error) {
|
||||||
Console.ForegroundColor = ConsoleColor.Red;
|
Console.ForegroundColor = ConsoleColor.Red;
|
||||||
Console.WriteLine(PrefixNewLines(error.ToString(), $"Error [{Name}]"));
|
Console.Write(PrefixNewLines(error.ToString(), $"Error [{Name}]"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private string PrefixNewLines(string text, string prefix) {
|
private string PrefixNewLines(string text, string prefix) {
|
||||||
|
|
Loading…
Reference in a new issue