Logger.WriteIf
Contents
[
Hide
]WriteIf(bool, string)
Writes the specified message to appenders if condition is true.
public void WriteIf(bool condition, string message)
Parameter | Type | Description |
---|---|---|
condition | Boolean | The condition to test. |
message | String | The message to write. |
See Also
- class Logger
- namespace Aspose.Email.Tools.Logging
- assembly Aspose.Email
WriteIf(bool, object)
Writes the specified message to appenders if condition is true.
public void WriteIf(bool condition, object message)
Parameter | Type | Description |
---|---|---|
condition | Boolean | The condition to test. |
message | Object | The message to write. |
See Also
- class Logger
- namespace Aspose.Email.Tools.Logging
- assembly Aspose.Email
WriteIf(bool, object, Exception)
Writes the specified message and exception to appenders if condition is true.
public void WriteIf(bool condition, object message, Exception exception)
Parameter | Type | Description |
---|---|---|
condition | Boolean | The condition to test. |
message | Object | The message to write. |
exception | Exception | The exception to write. |
See Also
- class Logger
- namespace Aspose.Email.Tools.Logging
- assembly Aspose.Email
WriteIf(LogLevel, string)
Writes the specified message if the log level is enabled.
public void WriteIf(LogLevel condition, string message)
Parameter | Type | Description |
---|---|---|
condition | LogLevel | The log level. |
message | String | The message to log. |
See Also
- class LogLevel
- class Logger
- namespace Aspose.Email.Tools.Logging
- assembly Aspose.Email
WriteIf(LogLevel, string, Exception)
Writes the specified message and exception if the log level is enabled.
public void WriteIf(LogLevel condition, string message, Exception exception)
Parameter | Type | Description |
---|---|---|
condition | LogLevel | The log level. |
message | String | The message to log. |
exception | Exception | The exception to log. |
See Also
- class LogLevel
- class Logger
- namespace Aspose.Email.Tools.Logging
- assembly Aspose.Email