Interface ILambdaSharpLogger
ILambdaSharpLogger provides the fundamental logging capabilities. Additional logging methods are provide as extension methods by ILambdaSharpLoggerEx.
Namespace: LambdaSharp.Logging
Assembly: LambdaSharp.Logging.dll
Syntax
public interface ILambdaSharpLogger
Properties
DebugLoggingEnabled
The DebugLoggingEnabled property indicates if log statements using DEBUG are emitted.
Declaration
bool DebugLoggingEnabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean | Boolean indicating if requests and responses are logged. |
Info
The Info property return information about the LambdaSharp environment.
Declaration
ILambdaSharpInfo Info { get; }
Property Value
Type | Description |
---|---|
ILambdaSharpInfo | The ILambdaSharpInfo instance. |
Methods
Log(LambdaLogLevel, Exception, String, Object[])
Log a message wit the given severity level. The format
string is used to create a unique signature for errors.
Therefore, any error information that varies between occurrences should be provided in the arguments
parameter.
Declaration
void Log(LambdaLogLevel level, Exception exception, string format, params object[] arguments)
Parameters
Type | Name | Description |
---|---|---|
LambdaLogLevel | level | The severity level of the log message. See LambdaLogLevel for a description of the severity levels. |
System.Exception | exception | Optional exception to log. The exception is logged with its description and stacktrace. This parameter can be |
System.String | format | Optional message to use instead of |
System.Object[] | arguments | Optional arguments for the |
Remarks
Nothing is logged if both format
and exception
are null.
LogRecord(ALambdaLogRecord)
Log a ALambdaLogRecord record instance.
Declaration
void LogRecord(ALambdaLogRecord record)
Parameters
Type | Name | Description |
---|---|---|
ALambdaLogRecord | record | The record to log. |