Show / Hide Table of Contents

Class BotBrainUILogger

An alternative BotBrainLogger class which sends exceptions as telemetry.

Inheritance
object
BotBrainLogger
BotBrainUILogger
Implements
ILogger
Inherited Members
BotBrainLogger.BeginScope<TState>(TState)
BotBrainLogger.IsEnabled(LogLevel)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Phoenix.BotBrain.Logging
Assembly: Phoenix.Plugin.BotBrain.Logging.dll
Syntax
public class BotBrainUILogger : BotBrainLogger, ILogger
Remarks

Initializes a new instance of the BotBrainUILogger class.

Constructors

View Source

BotBrainUILogger(BotBrainLogForwarder?, ITelemetryClient?)

An alternative BotBrainLogger class which sends exceptions as telemetry.

Declaration
public BotBrainUILogger(BotBrainLogForwarder? logForwarder = null, ITelemetryClient? telemetryClient = null)
Parameters
Type Name Description
BotBrainLogForwarder logForwarder

The log forwarder.

ITelemetryClient telemetryClient

The telemetry client.

Remarks

Initializes a new instance of the BotBrainUILogger class.

Methods

View Source

Log<TState>(LogLevel, EventId, TState, Exception?, Func<TState, Exception, string>)

Writes a log entry.

Declaration
public override void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception, string> formatter)
Parameters
Type Name Description
LogLevel logLevel

Entry will be written on this level.

EventId eventId

Id of the event.

TState state

The entry to be written. Can be also an object.

Exception exception

The exception related to this entry.

Func<TState, Exception, string> formatter

Function to create a string message of the state and exception.

Type Parameters
Name Description
TState

The type of the object to be written.

Overrides
BotBrainLogger.Log<TState>(LogLevel, EventId, TState, Exception, Func<TState, Exception, string>)

Implements

ILogger

Extension Methods

ILoggerExtensions.LogEventDebug(ILogger, LogEventArgs, EventId?, Exception?)
ILoggerExtensions.LogEventError(ILogger, LogEventArgs, EventId?, Exception?)
ILoggerExtensions.LogEventInformation(ILogger, LogEventArgs, EventId?, Exception?)
ILoggerExtensions.LogEventWarning(ILogger, LogEventArgs, EventId?, Exception?)
  • View Source
In this article
Back to top Generated by DocFX