Class AggregateLogger
An aggregate logger.
Inheritance
Implements
Inherited Members
Namespace: Kephas.Logging
Assembly: Kephas.Core.dll
Syntax
public class AggregateLogger : ILogger
Constructors
| Improve this Doc View SourceAggregateLogger(ILogger[])
Initializes a new instance of the AggregateLogger class.
Declaration
public AggregateLogger(params ILogger[] loggers)
Parameters
Type | Name | Description |
---|---|---|
ILogger[] | loggers | A variable-length parameters list containing loggers. |
Remarks
There is no requirement that the loggers contain at least one element.
AggregateLogger(IEnumerable<ILogger>)
Initializes a new instance of the AggregateLogger class.
Declaration
public AggregateLogger(IEnumerable<ILogger> loggers)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<ILogger> | loggers | A variable-length parameters list containing loggers. |
Remarks
There is no requirement that the loggers contain at least one element.
Methods
| Improve this Doc View SourceIsEnabled(LogLevel)
Indicates whether logging at the indicated level is enabled.
Declaration
public bool IsEnabled(LogLevel level)
Parameters
Type | Name | Description |
---|---|---|
LogLevel | level | The logging level. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Log(LogLevel, Exception, String, Object[])
Logs the information at the provided level.
Declaration
public void Log(LogLevel level, Exception exception, string messageFormat, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
LogLevel | level | The logging level. |
System.Exception | exception | The exception. |
System.String | messageFormat | The message format. |
System.Object[] | args | The arguments. |
Remarks
Note for implementors: the exception
may be null
, so be cautious and handle this case too.
For example, the Log(ILogger, LogLevel, String, Object[]) extension method passes a null
exception.