mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
Added a log level droplist
This commit is contained in:
parent
708031dcbb
commit
430bfe7bbb
21 changed files with 224 additions and 59 deletions
25
src/ServerManager.Discord/Enums/LogLevel.cs
Normal file
25
src/ServerManager.Discord/Enums/LogLevel.cs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
using Discord;
|
||||
using System;
|
||||
|
||||
namespace ServerManagerTool.DiscordBot.Enums
|
||||
{
|
||||
public enum LogLevel
|
||||
{
|
||||
Critical = 0,
|
||||
Error = 1,
|
||||
Warning = 2,
|
||||
Info = 3,
|
||||
Verbose = 4,
|
||||
Debug = 5
|
||||
}
|
||||
|
||||
public class LogLevelHelper
|
||||
{
|
||||
public static LogSeverity GetLogSeverity(LogLevel logLevel)
|
||||
{
|
||||
if (Enum.TryParse(logLevel.ToString(), out LogSeverity logSeverity))
|
||||
return logSeverity;
|
||||
return LogSeverity.Info;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue