LoggerExtensionsLogMessage Method
Log a message in TraceLogger format if the logging device is a TraceLogger, otherwise use the ILogger.Log format
Namespace: ASCOM.CommonAssembly: ASCOM.Common (in ASCOM.Common.dll) Version: 3.0.0-rc.1+86c25ce733aebb4d8b1b8a62e84770ea5e972bea
public static void LogMessage(
this ILogger logger,
LogLevel logLevel,
string method,
string message,
bool includeLib = true
)
<ExtensionAttribute>
Public Shared Sub LogMessage (
logger As ILogger,
logLevel As LogLevel,
method As String,
message As String,
Optional includeLib As Boolean = true
)
- logger ILogger
- ILogger device instance
- logLevel LogLevel
- ILogger LogLevel to use if the logger is not a TraceLogger.
- method String
- Calling method name
- message String
- Log message
- includeLib Boolean (Optional)
- Include the [LIB] library output identifier, defaults to True.
In Visual Basic and C#, you can call this method as an instance method on any object of type
ILogger. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Supported in: 2.0