# Microsoft.Extensions.Logging.EventLog ``` diff { namespace Microsoft.Extensions.Logging { public static class EventLoggerFactoryExtensions { - public static ILoggerFactory AddEventLog(this ILoggerFactory factory); - public static ILoggerFactory AddEventLog(this ILoggerFactory factory, EventLogSettings settings); - public static ILoggerFactory AddEventLog(this ILoggerFactory factory, LogLevel minLevel); + public static ILoggingBuilder AddEventLog(this ILoggingBuilder builder, Action configure); } } namespace Microsoft.Extensions.Logging.EventLog { - public class EventLogLogger : ILogger { { - public EventLogLogger(string name); - public EventLogLogger(string name, EventLogSettings settings); - public EventLogLogger(string name, EventLogSettings settings, IExternalScopeProvider externalScopeProvider); - public IEventLog EventLog { get; } - public IDisposable BeginScope(TState state); - public bool IsEnabled(LogLevel logLevel); - public void Log(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func formatter); - } public class EventLogLoggerProvider : IDisposable, ILoggerProvider, ISupportExternalScope { + public EventLogLoggerProvider(IOptions options); } public class EventLogSettings { - public IEventLog EventLog { get; set; } } - public class WindowsEventLog : IEventLog { { - public WindowsEventLog(string logName, string machineName, string sourceName); - public EventLog DiagnosticsEventLog { get; } - public int MaxMessageSize { get; } - public void WriteEntry(string message, EventLogEntryType type, int eventID, short category); - } } - namespace Microsoft.Extensions.Logging.EventLog.Internal { { - public interface IEventLog { { - int MaxMessageSize { get; } - void WriteEntry(string message, EventLogEntryType type, int eventID, short category); - } - } } ```