diff --git a/maskerlogger/masker_formatter.py b/maskerlogger/masker_formatter.py index dd03c28..c354140 100644 --- a/maskerlogger/masker_formatter.py +++ b/maskerlogger/masker_formatter.py @@ -3,7 +3,10 @@ import re from abc import ABC -from pythonjsonlogger import jsonlogger +try: + from pythonjsonlogger import json as jsonlogger +except ImportError: + from pythonjsonlogger import jsonlogger from maskerlogger.ahocorasick_regex_match import RegexMatcher from maskerlogger.utils import TimeoutException diff --git a/poetry.lock b/poetry.lock index 554c3d2..25b2221 100644 --- a/poetry.lock +++ b/poetry.lock @@ -459,16 +459,19 @@ testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtuale [[package]] name = "python-json-logger" -version = "2.0.7" -description = "A python library adding a json log formatter" +version = "3.3.0" +description = "JSON Log Formatter for the Python Logging Package" optional = false -python-versions = ">=3.6" +python-versions = ">=3.8" groups = ["main"] files = [ - {file = "python-json-logger-2.0.7.tar.gz", hash = "sha256:23e7ec02d34237c5aa1e29a070193a4ea87583bb4e7f8fd06d3de8264c4b2e1c"}, - {file = "python_json_logger-2.0.7-py3-none-any.whl", hash = "sha256:f380b826a991ebbe3de4d897aeec42760035ac760345e57b812938dc8b35e2bd"}, + {file = "python_json_logger-3.3.0-py3-none-any.whl", hash = "sha256:dd980fae8cffb24c13caf6e158d3d61c0d6d22342f932cb6e9deedab3d35eec7"}, + {file = "python_json_logger-3.3.0.tar.gz", hash = "sha256:12b7e74b17775e7d565129296105bbe3910842d9d0eb083fc83a6a617aa8df84"}, ] +[package.extras] +dev = ["backports.zoneinfo ; python_version < \"3.9\"", "black", "build", "freezegun", "mdx_truly_sane_lists", "mike", "mkdocs", "mkdocs-awesome-pages-plugin", "mkdocs-gen-files", "mkdocs-literate-nav", "mkdocs-material (>=8.5)", "mkdocstrings[python]", "msgspec ; implementation_name != \"pypy\"", "mypy", "orjson ; implementation_name != \"pypy\"", "pylint", "pytest", "tzdata", "validate-pyproject[all]"] + [[package]] name = "pyyaml" version = "6.0.3"