Class LogWithTag
Convenience logging helpers that prepend a custom ILogTag to every message.
public static class LogWithTag
- Inheritance
-
LogWithTag
- Inherited Members
Methods
Debug(ILogger, ILogTag, string, params object[])
Logs a message at the specified log level.
public static void Debug(this ILogger logger, ILogTag tag, string message, params object[] args)
Parameters
logger
ILoggertag
ILogTagmessage
stringThe message to log.
args
object[]Optional arguments used to format
message
.
DebugTrace(ILogger, ILogTag, string, params object[])
Logs a debug message with trace information (if enabled).
public static void DebugTrace(this ILogger logger, ILogTag tag, string message, params object[] args)
Parameters
Error(ILogger, ILogTag, Exception, params object[])
Logs an error encapsulating an exception
.
public static void Error(this ILogger logger, ILogTag tag, Exception exception, params object[] args)
Parameters
Error(ILogger, ILogTag, string, Exception, params object[])
Logs an error with a custom message and attached exception
.
public static void Error(this ILogger logger, ILogTag tag, string message, Exception exception, params object[] args)
Parameters
Error(ILogger, ILogTag, string, params object[])
Logs a message at the specified log level.
public static void Error(this ILogger logger, ILogTag tag, string message, params object[] args)
Parameters
logger
ILoggertag
ILogTagmessage
stringThe message to log.
args
object[]Optional arguments used to format
message
.
ErrorTrace(ILogger, ILogTag, Exception, params object[])
Logs an error with trace information for exception
.
public static void ErrorTrace(this ILogger logger, ILogTag tag, Exception exception, params object[] args)
Parameters
ErrorTrace(ILogger, ILogTag, string, Exception, params object[])
Logs an error with trace data (if enabled) and attached exception
.
public static void ErrorTrace(this ILogger logger, ILogTag tag, string message, Exception exception, params object[] args)
Parameters
ErrorTrace(ILogger, ILogTag, string, params object[])
Logs an error message with trace data.
public static void ErrorTrace(this ILogger logger, ILogTag tag, string message, params object[] args)
Parameters
Fatal(ILogger, ILogTag, string, params object[])
Logs a message at the specified log level.
public static void Fatal(this ILogger logger, ILogTag tag, string message, params object[] args)
Parameters
logger
ILoggertag
ILogTagmessage
stringThe message to log.
args
object[]Optional arguments used to format
message
.
FatalTrace(ILogger, ILogTag, string, params object[])
Logs a fatal error with trace (if enabled).
public static void FatalTrace(this ILogger logger, ILogTag tag, string message, params object[] args)
Parameters
Fine(ILogger, ILogTag, string, params object[])
Logs a message at the specified log level.
public static void Fine(this ILogger logger, ILogTag tag, string message, params object[] args)
Parameters
logger
ILoggertag
ILogTagmessage
stringThe message to log.
args
object[]Optional arguments used to format
message
.
FineTrace(ILogger, ILogTag, string, params object[])
Logs a fine-level message with optional trace.
public static void FineTrace(this ILogger logger, ILogTag tag, string message, params object[] args)
Parameters
Info(ILogger, ILogTag, string, params object[])
Logs a message at the specified log level.
public static void Info(this ILogger logger, ILogTag tag, string message, params object[] args)
Parameters
logger
ILoggertag
ILogTagmessage
stringThe message to log.
args
object[]Optional arguments used to format
message
.
InfoTrace(ILogger, ILogTag, string, params object[])
Logs an informational message and, if enabled, appends a stack trace.
public static void InfoTrace(this ILogger logger, ILogTag tag, string message, params object[] args)
Parameters
IsAllEnabled(ILogger, ILogTag?)
Returns true
if All is enabled for tag
.
public static bool IsAllEnabled(this ILogger logger, ILogTag? tag = null)
Parameters
Returns
IsDebugEnabled(ILogger, ILogTag?)
Returns true
if debug-level logging is enabled for tag
.
public static bool IsDebugEnabled(this ILogger logger, ILogTag? tag = null)
Parameters
Returns
IsErrorEnabled(ILogger, ILogTag?)
Returns true
if error-level logging is enabled for tag
.
public static bool IsErrorEnabled(this ILogger logger, ILogTag? tag = null)
Parameters
Returns
IsFatalEnabled(ILogger, ILogTag?)
Returns true
if fatal-level logging is enabled for tag
.
public static bool IsFatalEnabled(this ILogger logger, ILogTag? tag = null)
Parameters
Returns
IsFineEnabled(ILogger, ILogTag?)
Returns true
if fine-level logging is enabled for tag
.
public static bool IsFineEnabled(this ILogger logger, ILogTag? tag = null)
Parameters
Returns
IsInfoEnabled(ILogger, ILogTag?)
Returns true
if info-level logging is enabled for tag
.
public static bool IsInfoEnabled(this ILogger logger, ILogTag? tag = null)
Parameters
Returns
IsMessageEnabled(ILogger, ILogTag?)
Returns true
if message-level logging is enabled for tag
.
public static bool IsMessageEnabled(this ILogger logger, ILogTag? tag = null)
Parameters
Returns
IsNoneEnabled(ILogger, ILogTag?)
Returns true
if None is enabled for tag
.
public static bool IsNoneEnabled(this ILogger logger, ILogTag? tag = null)
Parameters
Returns
IsWarnEnabled(ILogger, ILogTag?)
Returns true
if warn-level logging is enabled for tag
.
public static bool IsWarnEnabled(this ILogger logger, ILogTag? tag = null)
Parameters
Returns
Message(ILogger, ILogTag, string, params object[])
Logs a message at the specified log level.
public static void Message(this ILogger logger, ILogTag tag, string message, params object[] args)
Parameters
logger
ILoggertag
ILogTagmessage
stringThe message to log.
args
object[]Optional arguments used to format
message
.
MessageTrace(ILogger, ILogTag, string, params object[])
Logs a general “message” level entry with optional trace.
public static void MessageTrace(this ILogger logger, ILogTag tag, string message, params object[] args)
Parameters
Warn(ILogger, ILogTag, string, params object[])
Logs a message at the specified log level.
public static void Warn(this ILogger logger, ILogTag tag, string message, params object[] args)
Parameters
logger
ILoggertag
ILogTagmessage
stringThe message to log.
args
object[]Optional arguments used to format
message
.
WarnTrace(ILogger, ILogTag, string, params object[])
Logs a warning with an optional stack trace (if enabled).
public static void WarnTrace(this ILogger logger, ILogTag tag, string message, params object[] args)