Log interface

Every log in Vostok.Logging implements ILog interface. This interface exposes three methods:

Method

Description

Log(LogEvent)

Logs given log event. This method is rarely invoked directly: it's preferable to use logging extensions.

IsEnabledFor(LogLevel)

Returns whether the current log is configured to record events of given level. This method is used in logging extensions to avoid unnecessary Log method calls.

ForContext(string)

Returns a copy of the current log operating in given source context.