TraceLogger(String, Boolean, Int32, LogLevel) Constructor
Create a new TraceLogger instance with automatic naming incorporating the supplied log file type
Namespace: ASCOM.ToolsAssembly: ASCOM.Tools (in ASCOM.Tools.dll) Version: 3.0.0-rc.1+86c25ce733aebb4d8b1b8a62e84770ea5e972bea
public TraceLogger(
string logFileType,
bool enabled,
int identifierWidth = 25,
LogLevel logLevel = LogLevel.Information
)
Public Sub New (
logFileType As String,
enabled As Boolean,
Optional identifierWidth As Integer = 25,
Optional logLevel As LogLevel = LogLevel.Information
)
Parameters
- logFileType String
- A short name to identify the contents of the log.
- enabled Boolean
- Initial state of the trace logger - Enabled or Disabled.
- identifierWidth Int32 (Optional)
- Width of the identifier field in the log message (Optional parameter, default: 25)
- logLevel LogLevel (Optional)
- Log level of the trace logger (Debug, Information, Warning etc.) (Optional parameter, default: LogLevel.Information)
Automatically generated directory names will be of the form: "Documents\ASCOM\Logs {CurrentDate:yyyymmdd}" on Windows and "HOME/ASCOM/Logs{CurrentDate:yyyymmdd}" on Linux
Automatically generated file names will be of the form: "ASCOM.{LogFileType}.{CurrentTime:HHmm.ssfff}{1 or 2 Digits, usually 0}.txt".
Supported in: 2.0