<@ULVA73B9P> I'm extracting logs from client.readl...
# ask-marvin
p
@Marvin I'm extracting logs from client.readlogs, and the log level is given as a number like this id=UUID('e4abf3ca-064d-45ed-8707-6a0200f31fe6') name='prefect.flow_runs.runner' level=20 should they be showing as numbers? and if so, what number corresponds to each info, warning, error, critical log levels?
m
thought for 53.1 seconds
Yes, it's normal to see the log levels as numbers. What you're seeing is the standard Python logging level system, which Prefect uses. Here's what each number corresponds to: - 10 = DEBUG - 20 = INFO (what you're seeing in your example) - 30 = WARNING - 40 = ERROR - 50 = CRITICAL In your example,
level=20
means it's an INFO level log message. This is actually the standard Python logging system that Prefect builds upon, so it's working as intended. If you want to see the text representation instead of numbers when working with logs programmatically, you can convert the numeric level using Python's built-in
logging.getLevelName()
function. You can find more details about Prefect's logging system and customization options in the logging customization documentation.