The log_helper was refactored to fallback to the root logger when
logging is enabled. Now, instead of each logger having its own
level and handler, we reuse the level of the root logger by
setting the level of the loggers to logging.NOTSET. We also keep
the default propagation behavior so instead of having a custom
handler for each logger, they will keep the NullHandler and when
logging they will use the handler of the root logger. This also
allowed us to set the JSON formatter only for the root logger,
since it's the only one actually logging things.
The base class for loggers was also removed because the way it
was used it would replace the base class for every logger, which
would affect modules importing oletools files. We now use an
adapter that is only valid for loggers created by the log_helper.
The hook for exceptions now wraps any hook previosly set instead
of replacing it altogether and this is only done when calling
modules as script.
Finally, the log_at_current_level() function was replaced by a
print_str() function defined in the adapter that will print
instead of logging when not using JSON so we can keep the old
behavior.