Hi all,
I’ve been trying to use the logging
module to log from my Dash app. Reading about logging and flask suggested I should use flask’s own logger app.logger
, so that my messages and flask’s messages go to the same place. Trying this directly with the app object created by Dash seems to work well.
The only issue is that some of my debug messages are not being logged. I would normally assume I have made a mistake in setting a log level somewhere. But some debug messages are getting through! If I add lines like
app.logger.debug('Test debug')
app.logger.info('Test info')
to the app right after the app = dash.Dash()
, both messages are logged. But if I add the exact same lines to a callback, only the info message is logged. I’m stuck in working out the cause. Is it possible this is something to do with how Dash manages callbacks?
I was really hoping to use debug messages to diagnose issues in callbacks. Any help much appreciated!!
I am setting (I think) the relevant log levels and am using app.run(debug=True)
. Otherwise I think the debug message at the start of the app would not get through either.
Clare