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
toFileboolIf
true, LogToFile(object?, string?) is returned; otherwise Log(object?, LogItemKind) is returned.kindLogItemKindLog item kind.