The ConsoleLogger implements the Caplin.Logging.ILogger interface and outputs all log messages to the console.
More...
|
| ConsoleLogger () |
| Initializes a new instance of the ConsoleLogger class that logs all messages (does not filter by log level). More...
|
|
| ConsoleLogger (string[] categories) |
| Initializes a new instance of the ConsoleLogger class that logs only the specified categories of message for any log level. More...
|
|
| ConsoleLogger (string[] categories, LogLevels level) |
| Initializes a new instance of the ConsoleLogger class that logs only the specified categories of messages, filtered by log level. More...
|
|
| ConsoleLogger (LogLevels level) |
| Initializes a new instance of the ConsoleLogger class that logs messages filtered by log level. More...
|
|
void | HandleException (Exception ex) |
| Logs a Caplin API exception. This method is automatically called by the Caplin library once the ConsoleLogger has been registered with the library instance as an exception handler. More...
|
|
void | Log (LogLevels level, string category, string message) |
| Logs a single message with a given severity and category. More...
|
|
void | Log (LogLevels level, string category, string message, params Object[] messageParameters) |
| Logs a single message with supplied parameter values substituted into it. More...
|
|
void | Log (LogLevels level, string[] categories, string message) |
| Logs a single message with a given severity and one or more categories. More...
|
|
void | Log (LogLevels level, string[] categories, string message, params Object[] messageParameters) |
| Logs a single message with a given severity and one or more categories, and with supplied parameter values substituted into it. More...
|
|
The ConsoleLogger implements the Caplin.Logging.ILogger interface and outputs all log messages to the console.
Caplin.Logging.ConsoleLogger.ConsoleLogger |
( |
| ) |
|
|
inline |
Initializes a new instance of the ConsoleLogger class that logs all messages (does not filter by log level).
Caplin.Logging.ConsoleLogger.ConsoleLogger |
( |
string[] |
categories | ) |
|
|
inline |
Initializes a new instance of the ConsoleLogger class that logs only the specified categories of message for any log level.
- Parameters
-
categories | The categories to be logged. This identifies the type of messages being logged or the component from which the message originates. |
Caplin.Logging.ConsoleLogger.ConsoleLogger |
( |
string[] |
categories, |
|
|
LogLevels |
level |
|
) |
| |
|
inline |
Initializes a new instance of the ConsoleLogger class that logs only the specified categories of messages, filtered by log level.
- Parameters
-
categories | The categories to be logged. This identifies the type of messages being logged or the component from which the message originates. |
level | The log filter level. Only messages with a log level that is at or above this value are logged. |
Caplin.Logging.ConsoleLogger.ConsoleLogger |
( |
LogLevels |
level | ) |
|
|
inline |
Initializes a new instance of the ConsoleLogger class that logs messages filtered by log level.
- Parameters
-
level | The log filter level. Only messages with a log level that is at or above this value are logged. |
void Caplin.Logging.ConsoleLogger.HandleException |
( |
Exception |
ex | ) |
|
|
inline |
void Caplin.Logging.ConsoleLogger.Log |
( |
LogLevels |
level, |
|
|
string |
category, |
|
|
string |
message |
|
) |
| |
|
inline |
Logs a single message with a given severity and category.
- Parameters
-
level | The logging level, indicating the severity of the message to be logged. |
category | The log category. This identifies the type of message being logged or the component from which the message originates. |
message | The message to be logged. |
Implements Caplin.Logging.ILogger.
void Caplin.Logging.ConsoleLogger.Log |
( |
LogLevels |
level, |
|
|
string |
category, |
|
|
string |
message, |
|
|
params Object[] |
messageParameters |
|
) |
| |
|
inline |
Logs a single message with supplied parameter values substituted into it.
The message can contain C# format specifiers that correspond to the message parameters. The method should substitute the message parameters into the supplied message (using System.String.Format(String, Object[])), to produce a readable message that is then logged.
- Parameters
-
level | The logging level, indicating the severity of the message to be logged. |
category | The log category. This identifies the type of message being logged or the component from which the message originates. |
message | The message to be logged. |
messageParameters | One or more message parameter values that are to be substituted into message . |
Implements Caplin.Logging.ILogger.
void Caplin.Logging.ConsoleLogger.Log |
( |
LogLevels |
level, |
|
|
string[] |
categories, |
|
|
string |
message |
|
) |
| |
|
inline |
Logs a single message with a given severity and one or more categories.
- Parameters
-
level | The logging level, indicating the severity of the message to be logged. |
categories | An arrary of log categories. These categories identify the type of message being logged and the components from which the message originates. |
message | The message to be logged. |
Implements Caplin.Logging.ILogger.
void Caplin.Logging.ConsoleLogger.Log |
( |
LogLevels |
level, |
|
|
string[] |
categories, |
|
|
string |
message, |
|
|
params Object[] |
messageParameters |
|
) |
| |
|
inline |
Logs a single message with a given severity and one or more categories, and with supplied parameter values substituted into it.
The message can contain C# format specifiers that correspond to the message parameters. The method should substitute the message parameters into the supplied message (using System.String.Format(String, Object[])), to produce a readable message that is then logged.
- Parameters
-
level | The logging level, indicating the severity of the message to be logged. |
categories | An arrary of log categories. These categories identify the type of message being logged and the components from which the message originates. |
message | The message to be logged. |
messageParameters | One or more message parameter values that are to be substituted into message . |
Implements Caplin.Logging.ILogger.
The lowest level (severity) at which messages are logged at.
For example, if Level is set to LogLevels.Info then only messages at Info level and above will be logged (that is, messages at levels Info, Warning, Notify, Error, Config, Critical). The default value is SourceLevels.Finest, which causes messages at all levels to be logged.
The log level at and above which messages are to be logged.