Show / Hide Table of Contents

Interface ILogger

Sink for log messages. Implemented by the host (or a sink package such as Zaya.Logging.Impl.Microsoft). Plugins must not depend on this type for day-to-day logging — use LogAttribute on implementation methods and Wrap<T>(T).

Namespace: Zaya.Logging.Services
Assembly: Zaya.Logging.dll
Syntax
public interface ILogger

Methods

| Edit this page View Source

IsEnabled(LogLevel)

Returns whether the given level is enabled for this logger. Used when building the proxy method map at Wrap<T>(T) time.

Declaration
bool IsEnabled(LogLevel level)
Parameters
Type Name Description
LogLevel level
Returns
Type Description
bool
| Edit this page View Source

Log(LogLevel, string, Exception?)

Writes a log entry.

Declaration
void Log(LogLevel level, string message, Exception? exception = null)
Parameters
Type Name Description
LogLevel level

Severity.

string message

Message text (typically method name and optional parameters).

Exception exception

Optional exception.

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX