I would like to intercept a specific log coming from overpass api and perform a retry of the function. When using
import osmnx as ox
ox.settings.log_console = True
I see the messages i.e. :
2025-05-28 09:14:32 Resolved 'overpass-api.de' to '65.109.112.52'
2025-05-28 09:15:52 Downloaded 0.4kB from 'overpass-api.de' with status 200
2025-05-28 09:15:52 'overpass-api.de' remarked: 'runtime error: Query run out of memory using about 4838 MB of RAM.'
2025-05-28 09:15:52 Retrieved 0 elements from API in 1 request(s)
if the runtime error is present, I need to block the run and perform a retry of a function. is there a way to access this log console? This is not a return of a function of osmnx, but it is coming from the API and is a general setting. I could not find any example on the python library documentation.