Method LogNameValueIf
LogNameValueIf(string, object?, bool, LogItemKind)
Logs name and value pair as "{name} = {value}" if condition
is true
.
public static void LogNameValueIf(string name, object? value, bool condition, LogItemKind kind = LogItemKind.Information)
Parameters
name
stringName.
value
objectValue.
condition
boolLog if
true
.kind
LogItemKindItem kind.