public static bool PreLogInternal(ELogType type, string message) { if (string.IsNullOrEmpty(message)) { return(false); } LogLevel logLevel; switch (type) { case ELogType.Info: logLevel = LogLevel.Information; break; case ELogType.Error: logLevel = LogLevel.Error; break; case ELogType.Exception: logLevel = LogLevel.Error; break; case ELogType.Warning: logLevel = LogLevel.Warning; break; case ELogType.Undefined: logLevel = LogLevel.Information; break; default: throw new ArgumentOutOfRangeException(nameof(type), type, null); } OnRocketLog?.Invoke(logLevel, message, null); return(false); }
public static bool PreLogException(Exception ex, string message) { OnRocketLog?.Invoke(LogLevel.Error, message, ex); return(false); }