From 6a161871630bad77cbee46a4fc4523f3d531ef29 Mon Sep 17 00:00:00 2001 From: Viktor Ahlqvist Date: Mon, 16 Aug 2021 17:50:01 +0200 Subject: [PATCH] Remove stderr log handler and formatter Remove the log handler and formatter, including python-json-logger dependency. It is better to let the Comet implementation deal with the log handlers and formatters and let those settings be inherited to the library. This is a potential breaking change if an implementation do not configure its' own logger/formatter. --- comet_core/__init__.py | 14 +------------- setup.py | 4 ++-- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/comet_core/__init__.py b/comet_core/__init__.py index 933cf93..21156d7 100644 --- a/comet_core/__init__.py +++ b/comet_core/__init__.py @@ -12,22 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""comet - Comet Distributed Security Notification System""" +"""Comet - Comet Distributed Security Notification System""" __author__ = "Spotify Security Wasabi team " __all__ = ["Comet"] -import logging - -from pythonjsonlogger import jsonlogger - from comet_core.app import Comet from comet_core.exceptions import CometAlertException, CometBaseException, CometCouldNotSendException - -root_logger = logging.getLogger() - -stderr_handler = logging.StreamHandler() -stderr_handler.setFormatter( - jsonlogger.JsonFormatter("%(asctime)s %(levelname)s %(name)s %(message)s", "%Y-%m-%dT%H:%M:%S") -) -root_logger.addHandler(stderr_handler) diff --git a/setup.py b/setup.py index 5a1ff37..fb4650e 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ setuptools.setup( name="comet-core", - version="2.9.0", + version="2.10.0", url="https://github.com/spotify/comet-core", author="Spotify Platform Security", author_email="wasabi@spotify.com", @@ -24,7 +24,7 @@ long_description=open("README.md", "r+", encoding="utf-8").read(), long_description_content_type="text/markdown", packages=["comet_core"], - install_requires=["Flask~=2.0", "Flask-Cors~=3.0", "python-json-logger~=2.0", "SQLAlchemy~=1.4"], + install_requires=["Flask~=2.0", "Flask-Cors~=3.0", "SQLAlchemy~=1.4"], include_package_data=True, classifiers=[ "Development Status :: 5 - Production/Stable",