Skip to main content

Logging

This article explains how to control level of the logs messages generated by Flet library and its underlying components. You may need to enable detailed logging to troubleshoot Flet library or when submitting a new Flet issue.

Python

Flet Python modules expose named loggers: flet_core and flet.

To enable detailed/verbose Flet logging in your program add this code before calling ft.run():

import logging
logging.basicConfig(level=logging.DEBUG)

This will enable loggers across all Flet modules (flet_core and flet).

To reduce verbosity you may suppress logging messages from flet_core module, but adding:

logging.getLogger("flet_core").setLevel(logging.INFO)

Debug logging is usually needed for troubleshooting purposes, when submitting a new Flet issue.

In the most cases you should be fine with INFO logging level.