TraceSourceLoggerProvider Class¶
Provides an ILoggerFactory based on System.Diagnostics.TraceSource.
- Namespace
Microsoft.Extensions.Logging.TraceSource
- Assemblies
- Microsoft.Extensions.Logging.TraceSource
Syntax¶
public class TraceSourceLoggerProvider : ILoggerProvider, IDisposable
-
class
Microsoft.Extensions.Logging.TraceSource.
TraceSourceLoggerProvider
Constructors¶
-
TraceSourceLoggerProvider
(System.Diagnostics.SourceSwitch)¶ Initializes a new instance of the
Microsoft.Extensions.Logging.TraceSource.TraceSourceLoggerProvider
class.public TraceSourceLoggerProvider(SourceSwitch rootSourceSwitch)
-
TraceSourceLoggerProvider
(System.Diagnostics.SourceSwitch, System.Diagnostics.TraceListener) Initializes a new instance of the
Microsoft.Extensions.Logging.TraceSource.TraceSourceLoggerProvider
class.public TraceSourceLoggerProvider(SourceSwitch rootSourceSwitch, TraceListener rootTraceListener)
-
Methods¶
-
CreateLogger
(System.String)¶ Creates a new
Microsoft.Extensions.Logging.ILogger
for the given component name.Return type: Microsoft.Extensions.Logging.ILogger public ILogger CreateLogger(string name)
-
Dispose
()¶ public void Dispose()
-