/// <summary> /// Initializes a new instance of the <see cref="EventLogTarget"/> class. /// </summary> internal EventLogTarget(IEventLogWrapper eventLogWrapper, IAppDomain appDomain) { _eventLogWrapper = eventLogWrapper ?? new EventLogWrapper(); appDomain = appDomain ?? LogFactory.CurrentAppDomain; Source = appDomain.FriendlyName; Log = "Application"; MachineName = "."; MaxMessageLength = EventLogMaxMessageLength; }
/// <summary> /// Initializes a new instance of the <see cref="EventLogTarget"/> class. /// </summary> internal EventLogTarget(IEventLogWrapper eventLogWrapper, IAppDomain appDomain) { _eventLogWrapper = eventLogWrapper ?? new EventLogWrapper(); appDomain = appDomain ?? LogFactory.CurrentAppDomain; Source = appDomain.FriendlyName; Log = "Application"; MachineName = "."; MaxMessageLength = EventLogMaxMessageLength; OptimizeBufferReuse = GetType() == typeof(EventLogTarget); // Class not sealed, reduce breaking changes }
public WindowsLogger(IEventLogWrapper eventLog) { _eventLog = eventLog; }