/// <summary> /// Default constructor /// </summary> /// <param name="logName"></param> internal EventLogger(string logName, EventOptions config) { _logName = logName; _loggerConfig = (EventOptions)config.Clone(); }
/// <summary> /// see IEventStoreConnector for documentation /// </summary> /// <param name="evt"></param> /// <returns></returns> public Guid Submit(LogEvent evt,EventOptions options=null) { var s = JsonConvert.SerializeObject(evt, Formatting.Indented, new JsonSerializerSettings() { ReferenceLoopHandling = ReferenceLoopHandling.Serialize }); var logger = getLogger(evt); var nLogLevel = getLogLevel(evt); if (!logger.IsEnabled(nLogLevel)) return evt.UUID; logger.Log((LogEventInfo)mapper(evt, nLogLevel)); return evt.UUID; }
public EventQueue(EventOptions options) { _options = options; }
/// <summary> /// See <see cref="HashTag.Diagnostics.IEventBuilder">IEventBuilder</see> for documentation /// </summary> /// <param name="events"></param> public void Submit(List<LogEvent> events,EventOptions options=null) { events.ForEach(e => Submit(e,options)); }
internal LogEventBuilder(EventOptions options, string loggerName) : this() { Config = (EventOptions)options.Clone(); this.loggerName = loggerName; }