Use logging handler from BrainzUtils in AcousticBrainz instead of custom local module
AcousticBrainz is using the loggers.py
file/module to display logs for monitoring and error detection while running the applications.
Other MetaBrainz Python-based projects are using an almost identical approach, hence this functionality has been ported to BrainzUtils - a collection of common utilities for the Python-based MetaBrainz sites. However, AcousticBrainz is still using its old, custom version instead of using the loggers.py
code from BrainzUtils.
In order to complete this task, you need to remove the usage of loggers.py
from AcousticBrainz and use the equivalent BrainzUtils function instead. We use loggers.py
here (https://github.com/metabrainz/acousticbrainz-server/blob/master/webserver/__init__.py#L58). Instead of importing init_loggers
, the code should actually just do app.init_loggers
which calls the equivalent BrainzUtils function.
Also, you should remove the loggers.py
file from the AcousticBrainz codebase.
References: