Method GetLogMethod
GetLogMethod(bool, LogItemKind)
Gets logging method based on the toFile
parameter value.
public static Action<object?> GetLogMethod(bool toFile, LogItemKind kind = LogItemKind.Information)
Parameters
toFile
boolIf
true
, LogToFile(object?, string?) is returned; otherwise Log(object?, LogItemKind) is returned.kind
LogItemKindLog item kind.