Method LogIf
LogIf(object?, bool, LogItemKind)
Calls LogMessage event if condition
is true
.
public static void LogIf(object? obj, bool condition, LogItemKind kind = LogItemKind.Information)
Parameters
obj
objectMessage text or object to log.
condition
boolLog if
true
.kind
LogItemKindItem kind.