コード例 #1
0
 public LogMessage(CollieLogSeverity severity, string source, string message, Exception exception = null)
 {
     Severity  = severity;
     Source    = source;
     Message   = message;
     Exception = exception;
 }
コード例 #2
0
 public async Task LogAsync(CollieLogSeverity severity, string source, string message, Exception ex = null)
 {
     try
     {
         if (severity <= Level)
         {
             await _messageEvent.InvokeAsync(new LogMessage(severity, source, message, ex)).ConfigureAwait(false);
         }
     }
     catch { }
 }
コード例 #3
0
ファイル: Logger.cs プロジェクト: Colliebot/Colliebot.Core
 public Task LogAsync(CollieLogSeverity severity, string message, Exception exception = null)
 => _manager.LogAsync(severity, Name, message, exception);
コード例 #4
0
 public LogManager(CollieLogSeverity minSeverity)
 {
     Level   = minSeverity;
     _logger = new Logger(this, "Github");
 }