/// <summary> /// Logs the a error line /// </summary> /// <param name="message">The message that should be logged</param> /// <param name="type">Where should the message be logged</param> public static void Error(string message, LogType type = LogType.Console) { try { Logger.Error(message, type); } catch (Exception e) { Log.e(e); } }
/// <summary> /// Logs the line with an [Warning] prefix /// </summary> /// <param name="prefix">Addds another prefix after [Info]</param> /// <param name="message">The message that should be logged</param> /// <param name="type">Where should the message be logged</param> public static void Warning(string prefix, string message, LogType type = LogType.Console) { try { Logger.Warning("[" + prefix + "]" + message, type); } catch (Exception e) { Log.e(e); } }
/// <summary> /// Logs the line with a [Debug] prefix if only the _debug is true /// </summary> /// <param name="prefix">Adds another prefix after [Debug]</param> /// <param name="message">The message thats hould be logged</param> /// <param name="always">Logs the line even if _debug id false</param> /// <param name="type">Where should the message be logged</param> public static void Debug(string prefix, string message, bool always = false, LogType type = LogType.Console) { try { if (Cfg.Debug || always) { Logger.Debug("[" + prefix + "]" + message, type); } } catch (Exception e) { Log.e(e); } }
/// <summary> /// Logs the line with a [Debug] prefix only if _debug is true /// </summary> /// <param name="message">The message that should be logged</param> /// <param name="always">Logs the line even if _debug is false</param> /// <param name="type">Where should the message be logged</param> public static void Debug(string message, bool always = false, LogType type = LogType.Console) { try { if (QPatch._debug || always) { Logger.Debug(message, type); } } catch (Exception e) { Log.e(e); } }