Common Logging 2.0 API Reference

TraceLogger Constructor

Creates a new TraceLogger instance.

[Visual Basic]
Public Sub New( _
   ByVal useTraceSource As Boolean, _
   ByVal logName As String, _
   ByVal logLevel As LogLevel, _
   ByVal showLevel As Boolean, _
   ByVal showDateTime As Boolean, _
   ByVal showLogName As Boolean, _
   ByVal dateTimeFormat As String _
)
[C#]
TraceLogger(
   bool useTraceSource,
   string logName,
   LogLevel logLevel,
   bool showLevel,
   bool showDateTime,
   bool showLogName,
   string dateTimeFormat
);

Parameters

useTraceSource
whether to use TraceSource or Trace for logging.
logName
the name of this logger
logLevel
the default log level to use
showLevel
Include the current log level in the log message.
showDateTime
Include the current time in the log message.
showLogName
Include the instance name in the log message.
dateTimeFormat
The date and time format to use in the log message.

See Also

TraceLogger Class | Common.Logging.Simple Namespace