Method DebugLogToFileIf
DebugLogToFileIf(object?, bool, string?)
Same as LogToFile(object?, string?) but writes message to file only under debug environment
(DEBUG conditional is defined) and if conditional
is true
.
[Conditional("DEBUG")]
public static void DebugLogToFileIf(object? obj, bool conditional, string? filename = null)
Parameters
obj
objectLog message or object.
conditional
boolWhether to log message to file.
filename
stringLog file path. LogFilePath is used when this parameter is
null
.