Class LogExtensions
Inherited Members
Namespace: log4net
Assembly: Acoustics.Shared.dll
Syntax
public static class LogExtensions
Fields
| Improve this Doc View SourcePromptLevel
Declaration
public static readonly Level PromptLevel
Field Value
Type | Description |
---|---|
log4net. |
SuccessLevel
Declaration
public static readonly Level SuccessLevel
Field Value
Type | Description |
---|---|
log4net. |
Methods
| Improve this Doc View SourceChoice(ILog, Boolean, String, String, String, Level)
Declaration
public static bool Choice(this ILog log, bool condition, string message, string trueMessage = "yes", string falseMessage = "no", Level level = null)
Parameters
Type | Name | Description |
---|---|---|
log4net. |
log | |
Boolean | condition | |
String | message | |
String | trueMessage | |
String | falseMessage | |
log4net. |
level |
Returns
Type | Description |
---|---|
Boolean |
IsVerboseEnabled(ILog)
Gets a value indicating whether the Verbose logging level is enabled.
Declaration
public static bool IsVerboseEnabled(this ILog log)
Parameters
Type | Name | Description |
---|---|---|
log4net. |
log | The logger to use. |
Returns
Type | Description |
---|---|
Boolean | True if the Verbose logging level is enabled. |
PassThrough<T>(ILog, T, Level, String)
Declaration
public static T PassThrough<T>(this ILog log, T value, Level level = null, string message = "value")
Parameters
Type | Name | Description |
---|---|---|
log4net. |
log | |
T | value | |
log4net. |
level | |
String | message |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |
Prompt(ILog, Object)
Log a message object with the Log
Declaration
public static void Prompt(this ILog log, object message)
Parameters
Type | Name | Description |
---|---|---|
log4net. |
log | The log. |
Object | message | The message. |
Success(ILog, Object)
Log a message object with the Log
Declaration
public static void Success(this ILog log, object message)
Parameters
Type | Name | Description |
---|---|---|
log4net. |
log | The log. |
Object | message | The message. |
Success(ILog, String, Object[])
Log a message object with the Log
Declaration
public static void Success(this ILog log, string format, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
log4net. |
log | The logger to use. |
String | format | The string format. |
Object[] | args | The args to the format string. |
Trace(ILog, Object)
Log a message object with the log4net.
Declaration
public static void Trace(this ILog log, object message)
Parameters
Type | Name | Description |
---|---|---|
log4net. |
log | The logger to use. |
Object | message | The message object to log. |
Remarks
See the Verbose(object) form for more detailed information.
Trace(ILog, Object, Exception)
Log a message object with the log4net.
Declaration
public static void Trace(this ILog log, object message, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
log4net. |
log | The logger to use. |
Object | message | The message object to log. |
Exception | exception | The exception to log, including its stack trace. |
Remarks
See the Trace(object) form for more detailed information.
See Also
Trace(ILog, String, Object[])
Log a message object with the log4net.
Declaration
public static void Trace(this ILog log, string format, params object[] args)
Parameters
Remarks
See the Trace(object) form for more detailed information.
Verbose(ILog, Object)
Log a message object with the log4net.
Declaration
public static void Verbose(this ILog log, object message)
Parameters
Type | Name | Description |
---|---|---|
log4net. |
log | |
Object | message |
Remarks
See the Verbose(object) form for more detailed information.
Verbose(ILog, String, Exception)
Log a message object with the log4net.
Declaration
public static void Verbose(this ILog log, string message, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
log4net. |
log | The logger to use. |
String | message | The message object to log. |
Exception | exception | The exception to log, including its stack trace. |
Remarks
See the Verbose(object) form for more detailed information.
Verbose(ILog, String, Object[])
Log a message object with the log4net.
Declaration
public static void Verbose(this ILog log, string format, params object[] args)
Parameters
Remarks
See the Verbose(object) form for more detailed information.