Closed sjefferson99 closed 1 month ago
This hasn't actually fixed it, I was premature in assuming the new errors were my exceptions and not further issues with the logging module. The old exc function took the argument e which is not the same as msg that exception expects. My error handling knowledge is not great and I guess this is where I dig in and make it better.
The logger module changes behaviour in this commit.
The notes do not seem to give a rationale for removing exc or how to modify code that relied on it, so will need to work out what function to call (presumably exception) and how. I'll post back here if I get that far.
Looks like the best approach is to use log.exception(f"
Have just hit this issue as well. Any problems with merging @sjefferson99's patch?
No problems, merged, thanks for contributing!
Unless I have missed something obvious, the webserver includes the standard micropython logging module and then attempts to call log.exc() instead of log.exception()
I have manually patched my server code to adjust this and exceptions are now correctly being surfaced in the logs instead of an error that log does not have function exc.
There are 3 occurrences in the _handler function lines 479, 484 and 488.