Table of Contents

Class LoggingExtensions

Namespace
Avalonia
Assembly
Avalonia.Controls.dll
public static class LoggingExtensions
Inheritance
LoggingExtensions
Inherited Members

Methods

LogToDelegate(AppBuilder, Action<string>, LogEventLevel, params string[])

Logs Avalonia events to a custom delegate

public static AppBuilder LogToDelegate(this AppBuilder builder, Action<string> logCallback, LogEventLevel level = LogEventLevel.Warning, params string[] areas)

Parameters

builder AppBuilder

The app builder instance.

logCallback Action<string>

The callback that's used for log events.

level LogEventLevel

The minimum level to log.

areas string[]

The areas to log. Valid values are listed in LogArea.

Returns

AppBuilder

The app builder instance.

LogToTextWriter(AppBuilder, TextWriter, LogEventLevel, params string[])

Logs Avalonia events to a TextWriter

public static AppBuilder LogToTextWriter(this AppBuilder builder, TextWriter writer, LogEventLevel level = LogEventLevel.Warning, params string[] areas)

Parameters

builder AppBuilder

The app builder instance.

writer TextWriter

The TextWriter that's used for log events.

level LogEventLevel

The minimum level to log.

areas string[]

The areas to log. Valid values are listed in LogArea.

Returns

AppBuilder

The app builder instance.

LogToTrace(AppBuilder, LogEventLevel, params string[])

Logs Avalonia events to the Trace sink.

public static AppBuilder LogToTrace(this AppBuilder builder, LogEventLevel level = LogEventLevel.Warning, params string[] areas)

Parameters

builder AppBuilder

The app builder instance.

level LogEventLevel

The minimum level to log.

areas string[]

The areas to log. Valid values are listed in LogArea.

Returns

AppBuilder

The app builder instance.