Show / Hide Table of Contents

Class ILambdaSharpLoggerEx

ILambdaSharpLoggerEx adds logging functionality as extension methods to the ILambdaSharpLogger interface.

Inheritance
System.Object
ILambdaSharpLoggerEx
Namespace: LambdaSharp.Logging
Assembly: LambdaSharp.Logging.dll
Syntax
public static class ILambdaSharpLoggerEx

Methods

LogDebug(ILambdaSharpLogger, String, Object[])

Log a debugging message. This message will only appear in the log and will not be forwarded to an error aggregator.

Declaration
public static void LogDebug(this ILambdaSharpLogger logger, string format, params object[] arguments)
Parameters
Type Name Description
ILambdaSharpLogger logger

The ILambdaSharpLogger instance to use.

System.String format

The message format string. If not arguments are supplied, the message format string will be printed as a plain string.

System.Object[] arguments

Optional arguments for the message string.

See Also
LambdaLogLevel

LogError(ILambdaSharpLogger, Exception)

Log an exception as an error. This message will be reported if an error aggregator is configured for the LambdaSharp.Core module.

Declaration
public static void LogError(this ILambdaSharpLogger logger, Exception exception)
Parameters
Type Name Description
ILambdaSharpLogger logger

The ILambdaSharpLogger instance to use.

System.Exception exception

The exception to log. The exception is logged with its message, stacktrace, and any nested exceptions.

See Also
LambdaLogLevel

LogError(ILambdaSharpLogger, Exception, String, Object[])

Log an exception with a custom message as an error. This message will be reported if an error aggregator is configured for the LambdaSharp.Core module.

Declaration
public static void LogError(this ILambdaSharpLogger logger, Exception exception, string format, params object[] arguments)
Parameters
Type Name Description
ILambdaSharpLogger logger

The ILambdaSharpLogger instance to use.

System.Exception exception

The exception to log. The exception is logged with its message, stacktrace, and any nested exceptions.

System.String format

Optional message to use instead of Exception.Message. This parameter can be null.

System.Object[] arguments

Optional arguments for the format parameter.

See Also
LambdaLogLevel

LogErrorAsInfo(ILambdaSharpLogger, Exception)

Log an exception as an information message. This message will only appear in the log and will not be forwarded to an error aggregator.

Declaration
public static void LogErrorAsInfo(this ILambdaSharpLogger logger, Exception exception)
Parameters
Type Name Description
ILambdaSharpLogger logger

The ILambdaSharpLogger instance to use.

System.Exception exception

The exception to log. The exception is logged with its message, stacktrace, and any nested exceptions.

Remarks

Only use this method when the exception has no operational impact. Otherwise, either use LogError(ILambdaSharpLogger, Exception) or LogErrorAsWarning(ILambdaSharpLogger, Exception).

See Also
LambdaLogLevel

LogErrorAsInfo(ILambdaSharpLogger, Exception, String, Object[])

Log an exception with a custom message as an information message. This message will only appear in the log and will not be forwarded to an error aggregator.

Declaration
public static void LogErrorAsInfo(this ILambdaSharpLogger logger, Exception exception, string format, params object[] arguments)
Parameters
Type Name Description
ILambdaSharpLogger logger

The ILambdaSharpLogger instance to use.

System.Exception exception

The exception to log. The exception is logged with its message, stacktrace, and any nested exceptions.

System.String format

Optional message to use instead of Exception.Message. This parameter can be null.

System.Object[] arguments

Optional arguments for the format parameter.

Remarks

Only use this method when the exception has no operational impact. Otherwise, either use LogError(ILambdaSharpLogger, Exception) or LogErrorAsWarning(ILambdaSharpLogger, Exception).

See Also
LambdaLogLevel

LogErrorAsWarning(ILambdaSharpLogger, Exception)

Log an exception as a warning. This message will be reported if an error aggregator is configured for the LambdaSharp.Core module.

Declaration
public static void LogErrorAsWarning(this ILambdaSharpLogger logger, Exception exception)
Parameters
Type Name Description
ILambdaSharpLogger logger

The ILambdaSharpLogger instance to use.

System.Exception exception

The exception to log. The exception is logged with its message, stacktrace, and any nested exceptions.

Remarks

Only use this method when the exception has no operational impact. Otherwise, either use LogError(ILambdaSharpLogger, Exception).

See Also
LambdaLogLevel

LogErrorAsWarning(ILambdaSharpLogger, Exception, String, Object[])

Log an exception with a custom message as a warning. This message will be reported if an error aggregator is configured for the LambdaSharp.Core module.

Declaration
public static void LogErrorAsWarning(this ILambdaSharpLogger logger, Exception exception, string format, params object[] arguments)
Parameters
Type Name Description
ILambdaSharpLogger logger

The ILambdaSharpLogger instance to use.

System.Exception exception

The exception to log. The exception is logged with its message, stacktrace, and any nested exceptions.

System.String format

Optional message to use instead of Exception.Message. This parameter can be null.

System.Object[] arguments

Optional arguments for the format parameter.

Remarks

Only use this method when the exception has no operational impact. Otherwise, either use LogError(ILambdaSharpLogger, Exception).

See Also
LambdaLogLevel

LogFatal(ILambdaSharpLogger, Exception, String, Object[])

Log a fatal exception with a custom message. This message will be reported if an error aggregator is configured for the LambdaSharp.Core module.

Declaration
public static void LogFatal(this ILambdaSharpLogger logger, Exception exception, string format, params object[] arguments)
Parameters
Type Name Description
ILambdaSharpLogger logger

The ILambdaSharpLogger instance to use.

System.Exception exception

The exception to log. The exception is logged with its message, stacktrace, and any nested exceptions.

System.String format

Optional message to use instead of Exception.Message. This parameter can be null.

System.Object[] arguments

Optional arguments for the format parameter.

See Also
LambdaLogLevel

LogInfo(ILambdaSharpLogger, String, Object[])

Log an informational message. This message will only appear in the log and will not be forwarded to an error aggregator.

Declaration
public static void LogInfo(this ILambdaSharpLogger logger, string format, params object[] arguments)
Parameters
Type Name Description
ILambdaSharpLogger logger

The ILambdaSharpLogger instance to use.

System.String format

The message format string. If not arguments are supplied, the message format string will be printed as a plain string.

System.Object[] arguments

Optional arguments for the message string.

See Also
LambdaLogLevel

LogWarn(ILambdaSharpLogger, String, Object[])

Log a warning message. This message will be reported if an error aggregator is configured for the LambdaSharp.Core module.

Declaration
public static void LogWarn(this ILambdaSharpLogger logger, string format, params object[] arguments)
Parameters
Type Name Description
ILambdaSharpLogger logger

The ILambdaSharpLogger instance to use.

System.String format

The message format string. If not arguments are supplied, the message format string will be printed as a plain string.

System.Object[] arguments

Optional arguments for the message string.

See Also
LambdaLogLevel

See Also

LambdaLogLevel
In This Article
Back to top Generated by DocFX