Method LogIf
LogIf(object?, bool, LogItemKind)
Calls Log(object?, LogItemKind) if condition
is true
.
public void LogIf(object? obj, bool condition, LogItemKind kind = LogItemKind.Information)
Parameters
obj
objectMessage text.
condition
boolWhether to log message.
kind
LogItemKindMessage kind.