LogToDelegate Method
Logs Avalonia events to a custom delegate
Definition
Namespace: Avalonia
Assembly: Avalonia.Controls (in Avalonia.Controls.dll)
- C#
- VB
- F#
public static AppBuilder LogToDelegate(
this AppBuilder builder,
Action<string> logCallback,
LogEventLevel level = LogEventLevel.Warning,
params string[] areas
)
<ExtensionAttribute>
Public Shared Function LogToDelegate (
builder As AppBuilder,
logCallback As Action(Of String),
Optional level As LogEventLevel = LogEventLevel.Warning,
ParamArray areas As String()
) As AppBuilder
[<ExtensionAttribute>]
static member LogToDelegate :
builder : AppBuilder *
logCallback : Action<string> *
?level : LogEventLevel *
areas : string[]
(* Defaults:
let _level = defaultArg level LogEventLevel.Warning
*)
-> AppBuilder
Parameters
- AppBuilder
- The app builder instance.
- Action(String)
- The callback that's used for log events.
- LogEventLevel (Optional)
- The minimum level to log.
- String[]
- The areas to log. Valid values are listed in LogArea.
Return Value
AppBuilder
The app builder instance.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type AppBuilder. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).