mne.set_log_file(fname=None, output_format='%(message)s', overwrite=None)[source]#

Set the log to print to a file.

fnamepath-like | None

Filename of the log to print to. If None, stdout is used. To suppress log outputs, use set_log_level(‘WARNING’).


Format of the output messages. See the following for examples:

e.g., “%(asctime)s - %(levelname)s - %(message)s”.

overwritebool | None

Overwrite the log file (if it exists). Otherwise, statements will be appended to the log (default). None is the same as False, but additionally raises a warning to notify the user that log entries will be appended.