Overview
FastF1 uses Python’s built-in logging module to provide progress information, warnings, and error messages during data loading and processing. All parts of FastF1 generally log at the INFO level to give users feedback during long-running operations.Quick Start
set_log_level()
level(str | int): Either a log level from the logging module (e.g.logging.INFO) or the level as a string (e.g.'WARNING')
'DEBUG'orlogging.DEBUG- Detailed information for debugging'INFO'orlogging.INFO- General progress information (default)'WARNING'orlogging.WARNING- Warning messages'ERROR'orlogging.ERROR- Error messages'CRITICAL'orlogging.CRITICAL- Critical errors
LoggingManager
Attributes
debug
True, this disables catch-all error handling for data loading methods, allowing exceptions to propagate fully.
Setting debug mode:
Methods
get_child()
name(str): Name of the child logger
logging.Logger: Child logger instance
set_level()
level(int): Log level, for examplelogging.INFO
It’s recommended to use the top-level
fastf1.set_log_level() function instead of this method directly.Utility Functions
get_logger()
name(str): Name for the logger (typically__name__of the module)
logging.Logger: Child logger instance
soft_exceptions()
LoggingManager.debug to True.
This decorator is used internally by FastF1 to wrap data loading functions. With the default configuration, it catches all unhandled exceptions and logs them as warnings, allowing data loading to continue. When debug mode is enabled, exceptions are raised normally.
Parameters:
descr_name(str): Descriptive name for the type of data that should have been loadedmsg(str): Short message shown as error message to userslogger(logging.Logger): Logger instance to use for logging errors
- Decorator function that can be applied to data loading functions
The
soft_exceptions decorator will re-raise FastF1CriticalError exceptions even when debug mode is disabled, ensuring critical errors like rate limiting are always surfaced to the user.Log Output Format
FastF1 uses a custom log format:Environment Variables
FASTF1_DEBUG
Set to'1' to enable debug mode.
- A warning is issued: “Debug Mode enabled for Logger!”
- Catch-all error handling is disabled
- All exceptions are raised instead of being caught and logged
