Class WsLogger
- Namespace
- WhalesSecret.TradeScriptLib.Logging
- Assembly
- WhalesSecret.TradeScriptLib.dll
NLog's logger with string-interpolation support and user ID prefix support.
public class WsLogger
- Inheritance
-
WsLogger
- Inherited Members
- Extension Methods
Constructors
- WsLogger(string, string?, bool)
Creates a logger instance with given user ID.
Properties
- IsDebugEnabled
Gets a value indicating whether logging is enabled for the
Debug
level.
- IsErrorEnabled
Gets a value indicating whether logging is enabled for the
Error
level.
- IsFatalEnabled
Gets a value indicating whether logging is enabled for the
Fatal
level.
- IsInfoEnabled
Gets a value indicating whether logging is enabled for the
Info
level.
- IsTraceEnabled
Gets a value indicating whether logging is enabled for the
Trace
level.
- IsWarnEnabled
Gets a value indicating whether logging is enabled for the
Warn
level.
Methods
- Debug(string, string, string, int)
Writes the diagnostic message at the NLog.LogLevel.Debug level.
- Debug(ref DebugLogInterpolatedStringHandler, string, string, int)
Writes the diagnostic message at the NLog.LogLevel.Debug level.
- Error(string, string, string, int)
Writes the diagnostic message at the NLog.LogLevel.Error level.
- Error(ref ErrorLogInterpolatedStringHandler, string, string, int)
Writes the diagnostic message at the NLog.LogLevel.Error level.
- Fatal(string, string, string, int)
Writes the diagnostic message at the NLog.LogLevel.Fatal level.
- Fatal(ref FatalLogInterpolatedStringHandler, string, string, int)
Writes the diagnostic message at the NLog.LogLevel.Fatal level.
- Flush()
Flush any pending log messages (in case of asynchronous targets).
- FlushAndShutDown()
Flush any pending log messages (in case of asynchronous targets), dispose all targets, and shut down logging.
- GetCurrentClassLogger(string?, string?, bool, int)
Convenience method to preserve the same contract as NLog provides.
- Info(string, string, string, int)
Writes the diagnostic message at the NLog.LogLevel.Info level.
- Info(ref InfoLogInterpolatedStringHandler, string, string, int)
Writes the diagnostic message at the NLog.LogLevel.Info level.
- IsEnabled(LogLevel)
Gets a value indicating whether logging is enabled for the specified level.
- SetInstanceId(uint)
Sets a unique MDLC instance ID to MDLC.
- SetMdlc(string?)
Sets a unique NLog Mapped Diagnostics Logical Context to the current execution context. This method is to be called at the start of each async context that we want to track separately.
- SetMdlcId(uint)
Sets a given value as the unique NLog Mapped Diagnostics Logical Context with a newly created execution context. This method is forcing the given MDLC ID to be used and circumvent the normal hierarchical flow that is achieved using SetMdlc(string?) and SetMdlc(ushort, string).
- Trace(string, string, string, int)
Writes the diagnostic message at the NLog.LogLevel.Trace level.
- Trace(ref TraceLogInterpolatedStringHandler, string, string, int)
Writes the diagnostic message at the NLog.LogLevel.Trace level.
- Warn(string, string, string, int)
Writes the diagnostic message at the NLog.LogLevel.Warn level.
- Warn(ref WarnLogInterpolatedStringHandler, string, string, int)
Writes the diagnostic message at the NLog.LogLevel.Warn level.