File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
5
5
[project ]
6
6
name = " python-json-logger"
7
- version = " 4.0 .0.dev1"
7
+ version = " 3.1 .0.dev1"
8
8
description = " JSON Log Formatter for the Python Logging Package"
9
9
authors = [
10
10
{name = " Zakaria Zajac" , email = " zak@madzak.com" },
Original file line number Diff line number Diff line change 4
4
5
5
## Standard Library
6
6
import sys
7
+ import warnings
7
8
8
9
## Installed
9
10
10
11
## Application
12
+ import pythonjsonlogger .json
11
13
12
14
### CONSTANTS
13
15
### ============================================================================
22
24
ORJSON_AVAILABLE = True
23
25
except ImportError :
24
26
ORJSON_AVAILABLE = False
27
+
28
+
29
+ ### DEPRECATED COMPATIBILITY
30
+ ### ============================================================================
31
+ def __getattr__ (name : str ):
32
+ if name == "jsonlogger" :
33
+ warnings .warn (
34
+ "pythonjsonlogger.jsonlogger has been moved to pythonjsonlogger.json" ,
35
+ DeprecationWarning ,
36
+ )
37
+ return pythonjsonlogger .json
38
+ raise AttributeError (f"module { __name__ } has no attribute { name } " )
You can’t perform that action at this time.
0 commit comments