using System; using Avalonia.Controls; using Avalonia.Logging; namespace Avalonia { public static class LoggingExtensions { [Obsolete("Use LogToTrace")] public static T LogToDebug( this T builder, LogEventLevel level = LogEventLevel.Warning, params string[] areas) where T : AppBuilderBase, new() { return LogToTrace(builder, level, areas); } /// /// 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 LogToTrace( this T builder, LogEventLevel level = LogEventLevel.Warning, params string[] areas) where T : AppBuilderBase, new() { Logger.Sink = new TraceLogSink(level, areas); return builder; } } }