Logging

fractalshades.log.set_log_handlers(verbosity: ~typing.Literal[<enum 'verbosity_enum'>])[source]

Sets the verbosity level for application logs.

Parameters:
verbosity: str or int

Possible values for verbosity string parameter are :

  • “warn @ console” only warnings are printed to the console

  • “warn + info @ console” warnings and info are printed to the console

  • “debug @ console + log” warnings, info and debug level printed to the console ; starts a new log file and outputs to it- same level

  • “debug2 @ console + log” same as above with lowest priority messages printed to log file.

The verbosity level may also be passed as an int in the range 0 to 3 (3 being the most verbose)

Notes

The directory for the log files shall have been defined before through the fractalshades.settings.log_directory parameter. A typical use case is show below:

fs.settings.log_directory = directory
fs.set_log_handlers(verbosity="debug @ console + log")