Skip to content

Commit 04d9324

Browse files
authored
Release 0.5.0
1 parent 8a48fae commit 04d9324

File tree

6 files changed

+19
-12
lines changed

6 files changed

+19
-12
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## 0.5.0 (2020-08-27)
4+
5+
- Updated supported ECS version to 1.6.0 ([#24](https://github.com/elastic/ecs-logging-python/pull/24))
6+
- Added support for `LogRecord.stack_info` ([#23](https://github.com/elastic/ecs-logging-python/pull/23))
7+
- Fixed normalizing of items in `list` that aren't of type
8+
`dict` ([#22](https://github.com/elastic/ecs-logging-python/pull/22), contributed by [`@camerondavison`](https://github.com/camerondavison))
9+
310
## 0.4 (2020-08-04)
411

512
- Added automatic collection of ECS fields `trace.id`, `span.id`, and `transaction.id` for

ecs_logging/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from ._stdlib import StdlibFormatter
55
from ._structlog import StructlogFormatter
66

7-
__version__ = "0.4"
7+
__version__ = "0.5.0"
88
__all__ = [
99
"ECS_VERSION",
1010
"StdlibFormatter",

ecs_logging/_meta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ECS_VERSION = "1.5.0"
1+
ECS_VERSION = "1.6.0"

tests/test_apm.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def test_elasticapm_structlog_log_correlation_ecs_fields():
3333
ecs = json.loads(stream.getvalue().rstrip())
3434
ecs.pop("@timestamp")
3535
assert ecs == {
36-
"ecs": {"version": "1.5.0"},
36+
"ecs": {"version": "1.6.0"},
3737
"log": {"level": "info"},
3838
"message": "test message",
3939
"span": {"id": span_id},
@@ -71,7 +71,7 @@ def test_elastic_apm_stdlib_no_filter_log_correlation_ecs_fields():
7171

7272
ecs = json.loads(stream.getvalue().rstrip())
7373
assert ecs == {
74-
"ecs": {"version": "1.5.0"},
74+
"ecs": {"version": "1.6.0"},
7575
"log": {
7676
"level": "info",
7777
"logger": "apm-logger",
@@ -115,7 +115,7 @@ def test_elastic_apm_stdlib_with_filter_log_correlation_ecs_fields():
115115

116116
ecs = json.loads(stream.getvalue().rstrip())
117117
assert ecs == {
118-
"ecs": {"version": "1.5.0"},
118+
"ecs": {"version": "1.6.0"},
119119
"log": {
120120
"level": "info",
121121
"logger": "apm-logger",
@@ -162,7 +162,7 @@ def test_elastic_apm_stdlib_exclude_fields():
162162

163163
ecs = json.loads(stream.getvalue().rstrip())
164164
assert ecs == {
165-
"ecs": {"version": "1.5.0"},
165+
"ecs": {"version": "1.6.0"},
166166
"log": {
167167
"level": "info",
168168
"logger": "apm-logger",

tests/test_stdlib_formatter.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def test_record_formatted():
3939
formatter = ecs_logging.StdlibFormatter(exclude_fields=["process"])
4040

4141
assert formatter.format(make_record()) == (
42-
'{"@timestamp":"2020-03-20T14:12:46.123Z","ecs":{"version":"1.5.0"},'
42+
'{"@timestamp":"2020-03-20T14:12:46.123Z","ecs":{"version":"1.6.0"},'
4343
'"log":{"level":"debug","logger":"logger-name","origin":{"file":{"line":10,"name":"file.py"},'
4444
'"function":"test_function"},"original":"1: hello"},"message":"1: hello"}'
4545
)
@@ -54,7 +54,7 @@ def format_to_ecs(self, record):
5454

5555
formatter = CustomFormatter(exclude_fields=["process"])
5656
assert formatter.format(make_record()) == (
57-
'{"@timestamp":"2020-03-20T14:12:46.123Z","custom":"field","ecs":{"version":"1.5.0"},'
57+
'{"@timestamp":"2020-03-20T14:12:46.123Z","custom":"field","ecs":{"version":"1.6.0"},'
5858
'"log":{"level":"debug","logger":"logger-name","origin":{"file":{"line":10,"name":"file.py"},'
5959
'"function":"test_function"},"original":"1: hello"},"message":"1: hello"}'
6060
)
@@ -68,7 +68,7 @@ def test_can_be_set_on_handler():
6868
handler.handle(make_record())
6969

7070
assert stream.getvalue() == (
71-
'{"@timestamp":"2020-03-20T14:12:46.123Z","ecs":{"version":"1.5.0"},'
71+
'{"@timestamp":"2020-03-20T14:12:46.123Z","ecs":{"version":"1.6.0"},'
7272
'"log":{"level":"debug","logger":"logger-name","origin":{"file":{"line":10,"name":"file.py"},'
7373
'"function":"test_function"},"original":"1: hello"},"message":"1: hello"}\n'
7474
)
@@ -102,7 +102,7 @@ def test_extra_is_merged(time, logger):
102102
assert isinstance(ecs["log"]["origin"]["file"].pop("line"), int)
103103
assert ecs == {
104104
"@timestamp": "2020-03-20T16:16:37.187Z",
105-
"ecs": {"version": "1.5.0"},
105+
"ecs": {"version": "1.6.0"},
106106
"log": {
107107
"level": "info",
108108
"logger": logger.name,

tests/test_structlog_formatter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def test_event_dict_formatted(time):
1414

1515
formatter = ecs_logging.StructlogFormatter()
1616
assert formatter(None, "debug", make_event_dict()) == (
17-
'{"@timestamp":"2020-03-20T16:16:37.187Z","ecs":{"version":"1.5.0"},'
17+
'{"@timestamp":"2020-03-20T16:16:37.187Z","ecs":{"version":"1.6.0"},'
1818
'"log":{"level":"debug","logger":"logger-name"},"message":"test message"}'
1919
)
2020

@@ -36,6 +36,6 @@ def test_can_be_set_as_processor(time):
3636

3737
assert stream.getvalue() == (
3838
'{"@timestamp":"2020-03-20T16:16:37.187Z","custom":"key",'
39-
'"dot":{"ted":1},"ecs":{"version":"1.5.0"},"log":{"level":"debug"},'
39+
'"dot":{"ted":1},"ecs":{"version":"1.6.0"},"log":{"level":"debug"},'
4040
'"message":"test message"}\n'
4141
)

0 commit comments

Comments
 (0)