public enum LogLevel { Debug=0, Error=1, Fatal=2, Info=3, Warn=4 }
switch (level) { case LogLevel.Debug: logInstance.Debug(message); break; case LogLevel.Error: logInstance.Error(message); break; case LogLevel.Fatal: logInstance.Fatal(message); break; case LogLevel.Info: logInstance.Info(message); break; case LogLevel.Warn: logInstance.Warn(message); break; default: logInstance.Info(message); break; }