mirror of
https://github.com/cadmium-im/zirconium-sharp.git
synced 2024-11-22 02:12:22 +00:00
Add debug log to Logger
This commit is contained in:
parent
5be00542b8
commit
964223444a
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1,3 @@
|
||||
/.config.toml
|
||||
bin
|
||||
obj
|
@ -42,5 +42,9 @@ namespace Zirconium.Core.Logging
|
||||
public static void Info(string message) {
|
||||
_defaultLogger.Info(message);
|
||||
}
|
||||
|
||||
public static void Debug(string message) {
|
||||
_defaultLogger.Debug(message);
|
||||
}
|
||||
}
|
||||
}
|
@ -34,6 +34,12 @@ namespace Zirconium.Core.Logging
|
||||
}
|
||||
}
|
||||
|
||||
public void Debug(string message) {
|
||||
if (_isVerbose) {
|
||||
writeLog(LogType.Debug, message);
|
||||
}
|
||||
}
|
||||
|
||||
public void Fatal(string message) {
|
||||
writeLog(LogType.Fatal, message);
|
||||
System.Environment.Exit(1);
|
||||
@ -70,6 +76,10 @@ namespace Zirconium.Core.Logging
|
||||
tagFormatter = new Formatter("WARNING", Color.Yellow);
|
||||
break;
|
||||
}
|
||||
case LogType.Debug: {
|
||||
tagFormatter = new Formatter("DEBUG", Color.Lime);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
tagFormatter = new Formatter("UNKNOWN", Color.Green);
|
||||
break;
|
||||
@ -87,7 +97,8 @@ namespace Zirconium.Core.Logging
|
||||
Error,
|
||||
Fatal,
|
||||
Info,
|
||||
Warning
|
||||
Warning,
|
||||
Debug
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user