Skip to content
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.

Commit

Permalink
Remove stderr log handler and formatter
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vikahl committed Aug 17, 2021
1 parent d894667 commit 6a16187
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
14 changes: 1 addition & 13 deletions comet_core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <wasabi@spotify.com>"
__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)
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@

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",
description="Comet Distributed Security Notification Framework",
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",
Expand Down

0 comments on commit 6a16187

Please sign in to comment.