Skip to content

Commit b6986be

Browse files
authored
@elastic/ecs-*-format v1.0.0 (#54)
1 parent 7a5a7f6 commit b6986be

File tree

16 files changed

+41
-59
lines changed

16 files changed

+41
-59
lines changed

README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,6 @@ In combination with [filebeat](https://www.elastic.co/products/beats/filebeat) y
99

1010
Please see the [Node.js ECS logging documentation](https://www.elastic.co/guide/en/ecs-logging/nodejs/current/intro.html).
1111

12-
---
13-
14-
**Please note** that the packages provided from this repo are in **beta** and
15-
backwards-incompatible changes might be introduced in releases during the
16-
"0.x" series. "1.0.0" versions will be released when no longer in beta.
17-
18-
---
1912

2013
## Supported logging frameworks
2114

docs/intro.asciidoc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
[[intro]]
22
== Introduction
33

4-
beta::[]
5-
64
Node.js ECS loggers are formatter plugins for your favorite logging libraries.
75
They make it easy to format your logs into ECS-compatible JSON. In combination
86
with https://www.elastic.co/products/beats/filebeat[filebeat] you can send your
@@ -19,7 +17,7 @@ popular web frameworks. A minimal log record includes the following fields:
1917
"@timestamp": "2021-01-13T21:32:38.095Z",
2018
"log.level": "info",
2119
"message": "hi",
22-
"ecs": {"version":"1.5.0"}
20+
"ecs": {"version":"1.6.0"}
2321
}
2422
----
2523

docs/morgan.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,12 @@ similar to the following:
8686
"log.level": "info",
8787
"message": "::1 - - [16/Jan/2021:00:03:23 +0000] \"GET / HTTP/1.1\" 200 13 \"-\" \"curl/7.64.1\"",
8888
"ecs": {
89-
"version": "1.5.0"
89+
"version": "1.6.0"
9090
},
9191
"http": {
9292
"version": "1.1",
9393
"request": {
94-
"method": "get",
94+
"method": "GET",
9595
"headers": {
9696
"host": "localhost:3000",
9797
"accept": "*/*"

docs/pino.asciidoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ Running this will produce log output similar to the following:
6868

6969
[source,cmd]
7070
----
71-
{"log.level":"info","@timestamp":"2021-01-19T22:51:12.142Z","ecs":{"version":"1.5.0"},"process":{"pid":82240},"host":{"hostname":"pink.local"},"message":"Hello world"}
72-
{"log.level":"warn","@timestamp":"2021-01-19T22:51:12.143Z","ecs":{"version":"1.5.0"},"process":{"pid":82240},"host":{"hostname":"pink.local"},"module":"foo","message":"From child"}
71+
{"log.level":"info","@timestamp":"2021-01-19T22:51:12.142Z","ecs":{"version":"1.6.0"},"process":{"pid":82240},"host":{"hostname":"pink.local"},"message":"Hello world"}
72+
{"log.level":"warn","@timestamp":"2021-01-19T22:51:12.143Z","ecs":{"version":"1.6.0"},"process":{"pid":82240},"host":{"hostname":"pink.local"},"module":"foo","message":"From child"}
7373
----
7474

7575
[float]
@@ -161,7 +161,7 @@ For example:
161161
"log.level": "info",
162162
"@timestamp": "2021-01-19T22:58:59.649Z",
163163
"ecs": {
164-
"version": "1.5.0"
164+
"version": "1.6.0"
165165
},
166166
"process": {
167167
"pid": 82670
@@ -172,7 +172,7 @@ For example:
172172
"http": {
173173
"version": "1.1",
174174
"request": {
175-
"method": "get",
175+
"method": "GET",
176176
"headers": {
177177
"host": "localhost:3000",
178178
"accept": "*/*"

docs/winston.asciidoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ Running this script (available https://github.com/elastic/ecs-logging-nodejs/blo
7777
[source,cmd]
7878
----
7979
% node examples/basic.js
80-
{"@timestamp":"2021-01-13T21:32:38.095Z","log.level":"info","message":"hi","ecs":{"version":"1.5.0"}}
81-
{"@timestamp":"2021-01-13T21:32:38.096Z","log.level":"error","message":"oops there is a problem","ecs":{"version":"1.5.0"},"foo":"bar"}
80+
{"@timestamp":"2021-01-13T21:32:38.095Z","log.level":"info","message":"hi","ecs":{"version":"1.6.0"}}
81+
{"@timestamp":"2021-01-13T21:32:38.096Z","log.level":"error","message":"oops there is a problem","ecs":{"version":"1.6.0"},"foo":"bar"}
8282
----
8383

8484
The formatter handles serialization to JSON, so you don't need to add the
@@ -120,7 +120,7 @@ will yield (pretty-printed for readability):
120120
"log.level": "info",
121121
"message": "oops",
122122
"ecs": {
123-
"version": "1.5.0"
123+
"version": "1.6.0"
124124
},
125125
"error": {
126126
"type": "Error",
@@ -192,12 +192,12 @@ For https://github.com/elastic/ecs-logging-nodejs/blob/master/loggers/winston/ex
192192
"log.level": "info",
193193
"message": "handled request",
194194
"ecs": {
195-
"version": "1.5.0"
195+
"version": "1.6.0"
196196
},
197197
"http": {
198198
"version": "1.1",
199199
"request": {
200-
"method": "get",
200+
"method": "GET",
201201
"headers": {
202202
"host": "localhost:3000",
203203
"accept": "*/*"

loggers/morgan/CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# @elastic/ecs-morgan-format Changelog
22

3-
## Unreleased
3+
## v1.0.0
4+
5+
- Update to @elastic/ecs-helpers@1.0.0: ecs.version is now "1.6.0",
6+
http.request.method is no longer lower-cased, improvements to HTTP
7+
serialization.
48

59
- Set "service.name" and "event.dataset" log fields if Elastic APM is started.
610
This helps to filter for different log streams in the same pod and the

loggers/morgan/README.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,6 @@ to inspect all logs in one single place.
1414

1515
Please see the [Node.js ECS morgan documentation](https://www.elastic.co/guide/en/ecs-logging/nodejs/current/morgan.html).
1616

17-
---
18-
19-
**Please note** that this library is in **beta** and backwards-incompatible
20-
changes might be introduced in releases during the "0.x" series.
21-
A "1.0.0" version will be released when no longer in beta.
22-
23-
---
2417

2518
## Install
2619

@@ -54,12 +47,12 @@ produce log output similar to the following:
5447
"log.level": "info",
5548
"message": "::1 - - [16/Jan/2021:00:03:23 +0000] \"GET / HTTP/1.1\" 200 13 \"-\" \"curl/7.64.1\"",
5649
"ecs": {
57-
"version": "1.5.0"
50+
"version": "1.6.0"
5851
},
5952
"http": {
6053
"version": "1.1",
6154
"request": {
62-
"method": "get",
55+
"method": "GET",
6356
"headers": {
6457
"host": "localhost:3000",
6558
"accept": "*/*"

loggers/morgan/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@elastic/ecs-morgan-format",
3-
"version": "0.3.0",
3+
"version": "1.0.0",
44
"description": "A formatter for the morgan logger compatible with Elastic Common Schema.",
55
"main": "index.js",
66
"files": [
@@ -35,7 +35,7 @@
3535
"node": ">=10"
3636
},
3737
"dependencies": {
38-
"@elastic/ecs-helpers": "^0.5.0"
38+
"@elastic/ecs-helpers": "^1.0.0"
3939
},
4040
"devDependencies": {
4141
"ajv": "^7.0.3",

loggers/pino/CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# @elastic/ecs-pino-format Changelog
22

3-
## Unreleased
3+
## v1.0.0
4+
5+
- Update to @elastic/ecs-helpers@1.0.0: ecs.version is now "1.6.0",
6+
http.request.method is no longer lower-cased, improvements to HTTP
7+
serialization.
48

59
- Add error logging feature. By default if an Error instance is passed as the
610
`err` field, then it will be converted to

loggers/pino/README.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@ to inspect all logs in one single place.
1313

1414
Please see the [Node.js ECS pino documentation](https://www.elastic.co/guide/en/ecs-logging/nodejs/current/pino.html).
1515

16-
---
17-
18-
**Please note** that this library is in **beta** and backwards-incompatible
19-
changes might be introduced in releases during the "0.x" series.
20-
A "1.0.0" version will be released when no longer in beta.
21-
22-
---
2316

2417
## Install
2518

@@ -45,8 +38,8 @@ child.warn('From child')
4538
Running this will produce log output similar to the following:
4639

4740
```sh
48-
{"log.level":"info","@timestamp":"2021-01-19T22:51:12.142Z","ecs":{"version":"1.5.0"},"process":{"pid":82240},"host":{"hostname":"pink.local"},"message":"Hello world"}
49-
{"log.level":"warn","@timestamp":"2021-01-19T22:51:12.143Z","ecs":{"version":"1.5.0"},"process":{"pid":82240},"host":{"hostname":"pink.local"},"module":"foo","message":"From child"}
41+
{"log.level":"info","@timestamp":"2021-01-19T22:51:12.142Z","ecs":{"version":"1.6.0"},"process":{"pid":82240},"host":{"hostname":"pink.local"},"message":"Hello world"}
42+
{"log.level":"warn","@timestamp":"2021-01-19T22:51:12.143Z","ecs":{"version":"1.6.0"},"process":{"pid":82240},"host":{"hostname":"pink.local"},"module":"foo","message":"From child"}
5043
```
5144

5245
Please see the [Node.js ECS pino documentation](https://www.elastic.co/guide/en/ecs-logging/nodejs/current/pino.html) for more.

0 commit comments

Comments
 (0)