Added support for .NET Standard 1.1 and 1.2
This commit is contained in:
@@ -17,56 +17,68 @@ namespace Discord.Logging
|
||||
ClientLogger = new Logger(this, "Discord");
|
||||
}
|
||||
|
||||
public async Task LogAsync(LogSeverity severity, string source, string message, Exception ex = null)
|
||||
{
|
||||
if (severity <= Level)
|
||||
await _messageEvent.InvokeAsync(new LogMessage(severity, source, message, ex)).ConfigureAwait(false);
|
||||
}
|
||||
public async Task LogAsync(LogSeverity severity, string source, FormattableString message, Exception ex = null)
|
||||
{
|
||||
if (severity <= Level)
|
||||
await _messageEvent.InvokeAsync(new LogMessage(severity, source, message.ToString(), ex)).ConfigureAwait(false);
|
||||
}
|
||||
public async Task LogAsync(LogSeverity severity, string source, Exception ex)
|
||||
{
|
||||
if (severity <= Level)
|
||||
await _messageEvent.InvokeAsync(new LogMessage(severity, source, null, ex)).ConfigureAwait(false);
|
||||
}
|
||||
public async Task LogAsync(LogSeverity severity, string source, string message, Exception ex = null)
|
||||
{
|
||||
if (severity <= Level)
|
||||
await _messageEvent.InvokeAsync(new LogMessage(severity, source, message, ex)).ConfigureAwait(false);
|
||||
}
|
||||
#if NETSTANDARD1_3
|
||||
public async Task LogAsync(LogSeverity severity, string source, FormattableString message, Exception ex = null)
|
||||
{
|
||||
if (severity <= Level)
|
||||
await _messageEvent.InvokeAsync(new LogMessage(severity, source, message.ToString(), ex)).ConfigureAwait(false);
|
||||
}
|
||||
#endif
|
||||
|
||||
public Task ErrorAsync(string source, string message, Exception ex = null)
|
||||
=> LogAsync(LogSeverity.Error, source, message, ex);
|
||||
public Task ErrorAsync(string source, FormattableString message, Exception ex = null)
|
||||
=> LogAsync(LogSeverity.Error, source, message, ex);
|
||||
public Task ErrorAsync(string source, Exception ex)
|
||||
=> LogAsync(LogSeverity.Error, source, ex);
|
||||
public Task ErrorAsync(string source, string message, Exception ex = null)
|
||||
=> LogAsync(LogSeverity.Error, source, message, ex);
|
||||
#if NETSTANDARD1_3
|
||||
public Task ErrorAsync(string source, FormattableString message, Exception ex = null)
|
||||
=> LogAsync(LogSeverity.Error, source, message, ex);
|
||||
#endif
|
||||
|
||||
public Task WarningAsync(string source, string message, Exception ex = null)
|
||||
=> LogAsync(LogSeverity.Warning, source, message, ex);
|
||||
public Task WarningAsync(string source, FormattableString message, Exception ex = null)
|
||||
=> LogAsync(LogSeverity.Warning, source, message, ex);
|
||||
public Task WarningAsync(string source, Exception ex)
|
||||
=> LogAsync(LogSeverity.Warning, source, ex);
|
||||
public Task WarningAsync(string source, string message, Exception ex = null)
|
||||
=> LogAsync(LogSeverity.Warning, source, message, ex);
|
||||
#if NETSTANDARD1_3
|
||||
public Task WarningAsync(string source, FormattableString message, Exception ex = null)
|
||||
=> LogAsync(LogSeverity.Warning, source, message, ex);
|
||||
#endif
|
||||
|
||||
public Task InfoAsync(string source, string message, Exception ex = null)
|
||||
=> LogAsync(LogSeverity.Info, source, message, ex);
|
||||
public Task InfoAsync(string source, FormattableString message, Exception ex = null)
|
||||
=> LogAsync(LogSeverity.Info, source, message, ex);
|
||||
public Task InfoAsync(string source, Exception ex)
|
||||
=> LogAsync(LogSeverity.Info, source, ex);
|
||||
public Task InfoAsync(string source, string message, Exception ex = null)
|
||||
=> LogAsync(LogSeverity.Info, source, message, ex);
|
||||
#if NETSTANDARD1_3
|
||||
public Task InfoAsync(string source, FormattableString message, Exception ex = null)
|
||||
=> LogAsync(LogSeverity.Info, source, message, ex);
|
||||
#endif
|
||||
|
||||
public Task VerboseAsync(string source, string message, Exception ex = null)
|
||||
=> LogAsync(LogSeverity.Verbose, source, message, ex);
|
||||
public Task VerboseAsync(string source, FormattableString message, Exception ex = null)
|
||||
=> LogAsync(LogSeverity.Verbose, source, message, ex);
|
||||
public Task VerboseAsync(string source, Exception ex)
|
||||
=> LogAsync(LogSeverity.Verbose, source, ex);
|
||||
public Task VerboseAsync(string source, string message, Exception ex = null)
|
||||
=> LogAsync(LogSeverity.Verbose, source, message, ex);
|
||||
#if NETSTANDARD1_3
|
||||
public Task VerboseAsync(string source, FormattableString message, Exception ex = null)
|
||||
=> LogAsync(LogSeverity.Verbose, source, message, ex);
|
||||
#endif
|
||||
|
||||
public Task DebugAsync(string source, string message, Exception ex = null)
|
||||
=> LogAsync(LogSeverity.Debug, source, message, ex);
|
||||
public Task DebugAsync(string source, FormattableString message, Exception ex = null)
|
||||
=> LogAsync(LogSeverity.Debug, source, message, ex);
|
||||
public Task DebugAsync(string source, Exception ex)
|
||||
=> LogAsync(LogSeverity.Debug, source, ex);
|
||||
public Task DebugAsync(string source, string message, Exception ex = null)
|
||||
=> LogAsync(LogSeverity.Debug, source, message, ex);
|
||||
#if NETSTANDARD1_3
|
||||
public Task DebugAsync(string source, FormattableString message, Exception ex = null)
|
||||
=> LogAsync(LogSeverity.Debug, source, message, ex);
|
||||
#endif
|
||||
|
||||
public Logger CreateLogger(string name) => new Logger(this, name);
|
||||
|
||||
|
||||
@@ -20,42 +20,54 @@ namespace Discord.Logging
|
||||
=> _manager.LogAsync(severity, Name, exception);
|
||||
public Task LogAsync(LogSeverity severity, string message, Exception exception = null)
|
||||
=> _manager.LogAsync(severity, Name, message, exception);
|
||||
#if NETSTANDARD1_3
|
||||
public Task LogAsync(LogSeverity severity, FormattableString message, Exception exception = null)
|
||||
=> _manager.LogAsync(severity, Name, message, exception);
|
||||
#endif
|
||||
|
||||
public Task ErrorAsync(string message, Exception exception = null)
|
||||
=> _manager.ErrorAsync(Name, message, exception);
|
||||
public Task ErrorAsync(FormattableString message, Exception exception = null)
|
||||
=> _manager.ErrorAsync(Name, message, exception);
|
||||
public Task ErrorAsync(Exception exception)
|
||||
=> _manager.ErrorAsync(Name, exception);
|
||||
public Task ErrorAsync(string message, Exception exception = null)
|
||||
=> _manager.ErrorAsync(Name, message, exception);
|
||||
#if NETSTANDARD1_3
|
||||
public Task ErrorAsync(FormattableString message, Exception exception = null)
|
||||
=> _manager.ErrorAsync(Name, message, exception);
|
||||
#endif
|
||||
|
||||
public Task WarningAsync(string message, Exception exception = null)
|
||||
=> _manager.WarningAsync(Name, message, exception);
|
||||
public Task WarningAsync(FormattableString message, Exception exception = null)
|
||||
=> _manager.WarningAsync(Name, message, exception);
|
||||
public Task WarningAsync(Exception exception)
|
||||
=> _manager.WarningAsync(Name, exception);
|
||||
public Task WarningAsync(string message, Exception exception = null)
|
||||
=> _manager.WarningAsync(Name, message, exception);
|
||||
#if NETSTANDARD1_3
|
||||
public Task WarningAsync(FormattableString message, Exception exception = null)
|
||||
=> _manager.WarningAsync(Name, message, exception);
|
||||
#endif
|
||||
|
||||
public Task InfoAsync(string message, Exception exception = null)
|
||||
=> _manager.InfoAsync(Name, message, exception);
|
||||
public Task InfoAsync(FormattableString message, Exception exception = null)
|
||||
=> _manager.InfoAsync(Name, message, exception);
|
||||
public Task InfoAsync(Exception exception)
|
||||
=> _manager.InfoAsync(Name, exception);
|
||||
public Task InfoAsync(string message, Exception exception = null)
|
||||
=> _manager.InfoAsync(Name, message, exception);
|
||||
#if NETSTANDARD1_3
|
||||
public Task InfoAsync(FormattableString message, Exception exception = null)
|
||||
=> _manager.InfoAsync(Name, message, exception);
|
||||
#endif
|
||||
|
||||
public Task VerboseAsync(string message, Exception exception = null)
|
||||
=> _manager.VerboseAsync(Name, message, exception);
|
||||
public Task VerboseAsync(FormattableString message, Exception exception = null)
|
||||
=> _manager.VerboseAsync(Name, message, exception);
|
||||
public Task VerboseAsync(Exception exception)
|
||||
=> _manager.VerboseAsync(Name, exception);
|
||||
public Task VerboseAsync(string message, Exception exception = null)
|
||||
=> _manager.VerboseAsync(Name, message, exception);
|
||||
#if NETSTANDARD1_3
|
||||
public Task VerboseAsync(FormattableString message, Exception exception = null)
|
||||
=> _manager.VerboseAsync(Name, message, exception);
|
||||
#endif
|
||||
|
||||
public Task DebugAsync(string message, Exception exception = null)
|
||||
=> _manager.DebugAsync(Name, message, exception);
|
||||
public Task DebugAsync(FormattableString message, Exception exception = null)
|
||||
=> _manager.DebugAsync(Name, message, exception);
|
||||
public Task DebugAsync(Exception exception)
|
||||
=> _manager.DebugAsync(Name, exception);
|
||||
public Task DebugAsync(string message, Exception exception = null)
|
||||
=> _manager.DebugAsync(Name, message, exception);
|
||||
#if NETSTANDARD1_3
|
||||
public Task DebugAsync(FormattableString message, Exception exception = null)
|
||||
=> _manager.DebugAsync(Name, message, exception);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user