using Avalonia.Controls; using Avalonia.Logging; namespace Avalonia { public static class LoggingExtensions { /// /// Logs Avalonia events to the sink. /// /// The application class type. /// The app builder instance. /// The minimum level to log. /// The areas to log. Valid values are listed in . /// The app builder instance. public static T LogToDebug( this T builder, LogEventLevel level = LogEventLevel.Warning, params string[] areas) where T : AppBuilderBase, new() { Logger.Sink = new DebugLogSink(level, areas); return builder; } } }