Cleanup Logging for python functions#2847
Conversation
|
rerun integration tests |
| Log.info("Import failed class_name %s from path %s" % (class_name, from_path)) | ||
| Log.info(e, exc_info=True) | ||
| return None | ||
| mod = importlib.import_module(class_name) |
There was a problem hiding this comment.
Can an exception be thrown here?
There was a problem hiding this comment.
This causes cascading changes to all users of this function(of which there are many). Maybe that cleanup belongs to another change?
There was a problem hiding this comment.
didn't this throw an exception before and we catch it and when to do print. If we don't do the try and except, wouldn't it crash the function instance?
There was a problem hiding this comment.
Sorry, I mistook the part of the code.
So this function is only called from the functions above(import_class). This function was prev returning None in exceptions and this pr makes it throw an exception which the caller catches and logs about that exception
|
rerun integration tests |
Motivation
Move a lot of logging from .info to .debug.
Also cleaned up the import logging exceptions.
Modifications
Describe the modifications you've done.
Result
After your change, what will change.