You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
7
7
## [Unreleased]
8
8
9
+
## [0.4.0] - 2023-01-09
10
+
### Changed
11
+
- Default message key is now `message` instead of `msg` to stay in line with python default. If you still want previous behavior, set `message_field_name` to `msg` at formatter creation.
12
+
13
+
### Removed
14
+
- Drop support for python 3.6.
15
+
9
16
## [0.3.0] - 2022-12-02
10
17
### Added
11
18
- Added `exception_field_name` parameter.
@@ -27,7 +34,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
<ahref="https://github.com/Colin-b/logging_json/actions"><imgalt="Number of tests"src="https://img.shields.io/badge/tests-18 passed-blue"></a>
8
+
<ahref="https://github.com/Colin-b/logging_json/actions"><imgalt="Number of tests"src="https://img.shields.io/badge/tests-21 passed-blue"></a>
9
9
<ahref="https://pypi.org/project/logging_json/"><imgalt="Number of downloads"src="https://img.shields.io/pypi/dm/logging_json"></a>
10
10
</p>
11
11
@@ -57,9 +57,9 @@ The resulting JSON dictionary will be the one you provided (with the [additional
57
57
58
58
### Logging with anything else (such as a string)
59
59
60
-
Anything not logged using a dictionary will be handled by the standard formatter and it can result in one of the 2 output:
61
-
* A JSON dictionary, if [additional fields](#adding-additional-fields-and-values) are set or if `extra` parameter is used while logging, with the message available in the `msg` key of the resulting JSON dictionary.
62
-
Default `msg` key name can be changed by `message_field_name` parameter of the `logging_json.JSONFormatter` instance.
60
+
Anything not logged using a dictionary will be handled by the standard formatter, and it can result in one of the 2 output:
61
+
* A JSON dictionary, if [additional fields](#adding-additional-fields-and-values) are set or if `extra` parameter is used while logging, with the message available in the `message` key of the resulting JSON dictionary.
62
+
Default `message` key name can be changed by `message_field_name` parameter of the `logging_json.JSONFormatter` instance.
63
63
* The formatted record, if no [additional fields](#adding-additional-fields-and-values) are set.
64
64
65
65
This handles the usual string logging as in the following:
@@ -72,7 +72,7 @@ logging.info("This is my message")
72
72
73
73
## Configuration
74
74
75
-
You can create a formatter instance yourself as in the following or you can use a logging configuration.
75
+
You can create a formatter instance yourself as in the following, or you can use a logging configuration.
76
76
77
77
```python
78
78
import logging_json
@@ -159,7 +159,7 @@ root:
159
159
```
160
160
161
161
## How to install
162
-
1. [python 3.6+](https://www.python.org/downloads/) must be installed
162
+
1. [python 3.7+](https://www.python.org/downloads/) must be installed
0 commit comments