public void Send(LogEventInfo logEvent) { if (logsTransport == null || logsTransport.Connected == false) { return; } bool shouldLog = false; bool watchStackTrace = false; using (slim.EnterReadLock()) { foreach (var config in logConfig) { if (logEvent.LoggerName.StartsWith(config.Key) == false) { continue; } if (logEvent.Level < config.Value.Level) { continue; } shouldLog = true; watchStackTrace = config.Value.WatchStack; } } if (shouldLog == false) { return; } if (watchStackTrace) { logEvent.StackTrace = new StackTrace(); } logsTransport.SendAsync(logEvent); }
private void Enqueue(object msg) { if (eventsTransport == null || eventsTransport.Connected == false) { return; } eventsTransport.SendAsync(msg); }
public void Send(LogEventInfo logEvent) { if (logsTransport == null || logsTransport.Connected == false) { return; } if (ShouldLog(logEvent)) { logsTransport.SendAsync(logEvent); } }