(message, category, filename, lineno, file=None, line=None)
| 105 | |
| 106 | # Custom warning handler to redirect warnings to the logging system |
| 107 | def warning_handler(message, category, filename, lineno, file=None, line=None): |
| 108 | logging.warning(f"{filename}:{lineno}: {category.__name__}: {message}") |
| 109 | |
| 110 | # Add the custom warning handler - we need to do that before importing anything to make sure the loggers work well |
| 111 | warnings.showwarning = warning_handler |
nothing calls this directly
no outgoing calls
no test coverage detected