public static string GetStringForLogLevel(MpvLogLevel logLevel) { switch (logLevel) { case MpvLogLevel.None: return("no"); case MpvLogLevel.Fatal: return("fatal"); case MpvLogLevel.Error: return("error"); case MpvLogLevel.Warning: return("warn"); case MpvLogLevel.Info: return("info"); case MpvLogLevel.V: return("v"); case MpvLogLevel.Debug: return("debug"); case MpvLogLevel.Trace: return("trace"); default: return(null); } }
public static void WriteMPVLog(string msg, MpvLogLevel level) { if (level == MpvLogLevel.Info) { Logger.Current.Info(msg); } else if (level == MpvLogLevel.Debug) { Logger.Current.Debug(msg); } else if (level == MpvLogLevel.Error) { Logger.Current.Error(msg); } else { Logger.Current.Info(msg); } }