log_comment

grizli.utils.log_comment(LOGFILE, comment, verbose=False, show_date=False, mode='a')[source]

Log a message to a file, optionally including a date tag

Parameters
LOGFILEstr

The path to the log file.

commentstr

The message to be logged.

verbosebool, optional

If True, the logged message will also be printed to the console. Default is False.

show_datebool, optional

If True, the logged message will include a date tag. Default is False.

modestr, optional

The mode in which the log file will be opened. Default is “a” (append).

Returns
msgstr

The logged message.