Because method __init__ in metaclass TrackSubClasses in file util.py is run before function setup_logger(verbose) in file cli.py
The trackback with
import traceback
print('\n'.join(traceback.format_stack()))
logger.error('Registering %r as %s', cls, cls.__kind__)
File "/path/bin/urlwatch", line 5, in <module>
from urlwatch.cli import main
File "/path/lib/python3.9/site-packages/urlwatch/cli.py", line 54, in <module>
from urlwatch.command import UrlwatchCommand
File "/path/lib/python3.9/site-packages/urlwatch/command.py", line 38, in <module>
from .filters import FilterBase
File "/path/lib/python3.9/site-packages/urlwatch/filters.py", line 268, in <module>
class BeautifyFilter(FilterBase):
File "/path/lib/python3.9/site-packages/urlwatch/util.py", line 71, in __init__
print('\n'.join(traceback.format_stack()))
https://github.com/thp/urlwatch/blob/b9a5487c87ee4a61657fbff2811558ab6a87e691/lib/urlwatch/util.py#L71
https://github.com/thp/urlwatch/blob/b9a5487c87ee4a61657fbff2811558ab6a87e691/lib/urlwatch/cli.py#L95
Because method
__init__
in metaclassTrackSubClasses
in fileutil.py
is run before functionsetup_logger(verbose)
in filecli.py
The
trackback
with