Skip to content

Commit f71a0ab

Browse files
authored
chore: some light README and comment updates (#159)
1 parent 2a6be30 commit f71a0ab

File tree

8 files changed

+30
-23
lines changed

8 files changed

+30
-23
lines changed

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# ecs-logging-nodejs
44

5-
[![Build Status](https://apm-ci.elastic.co/buildStatus/icon?job=apm-agent-nodejs%2Fecs-logging-nodejs-mbp%2Fmain)](https://apm-ci.elastic.co/job/apm-agent-nodejs/job/ecs-logging-nodejs-mbp/job/main/) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)
5+
[![test](https://github.com/elastic/ecs-logging-nodejs/actions/workflows/test.yml/badge.svg)](https://github.com/elastic/ecs-logging-nodejs/actions/workflows/test.yml)
66

77
This set of libraries allows you to transform your application logs to structured logs that comply with the [Elastic Common Schema (ECS)](https://www.elastic.co/guide/en/ecs/current/ecs-reference.html).
88
In combination with [filebeat](https://www.elastic.co/products/beats/filebeat) you can send your logs directly to Elasticsearch and leverage [Kibana's Logs app](https://www.elastic.co/guide/en/observability/current/monitor-logs.html) to inspect all logs in one single place.
@@ -12,12 +12,15 @@ Please see the [Node.js ECS logging documentation](https://www.elastic.co/guide/
1212

1313
## Supported logging frameworks
1414

15-
- [Morgan](https://github.com/expressjs/morgan) via [@elastic/ecs-morgan-format](./packages/ecs-morgan-format)
16-
([docs](https://www.elastic.co/guide/en/ecs-logging/nodejs/current/morgan.html))
17-
- [Pino](https://getpino.io/#/) via [@elastic/ecs-pino-format](./packages/ecs-pino-format)
18-
([docs](https://www.elastic.co/guide/en/ecs-logging/nodejs/current/pino.html))
19-
- [Winston](https://github.com/winstonjs/winston) via [@elastic/ecs-winston-format](./packages/ecs-winston-format)
20-
([docs](https://www.elastic.co/guide/en/ecs-logging/nodejs/current/winston.html))
15+
- Pino via [@elastic/ecs-pino-format](./packages/ecs-pino-format)
16+
([docs](https://www.elastic.co/guide/en/ecs-logging/nodejs/current/pino.html),
17+
[changelog](./packages/ecs-pino-format/CHANGELOG.md))
18+
- Winston via [@elastic/ecs-winston-format](./packages/ecs-winston-format)
19+
([docs](https://www.elastic.co/guide/en/ecs-logging/nodejs/current/winston.html),
20+
[changelog](./packages/ecs-winston-format/CHANGELOG.md))
21+
- Morgan via [@elastic/ecs-morgan-format](./packages/ecs-morgan-format)
22+
([docs](https://www.elastic.co/guide/en/ecs-logging/nodejs/current/morgan.html),
23+
[changelog](./packages/ecs-morgan-format/CHANGELOG.md))
2124

2225
## Links
2326

docs/index.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ endif::[]
1212

1313
ifndef::env-github[]
1414
include::./intro.asciidoc[Introduction]
15-
include::./morgan.asciidoc[Logging with Morgan]
1615
include::./pino.asciidoc[Logging with Pino]
1716
include::./winston.asciidoc[Logging with Winston]
17+
include::./morgan.asciidoc[Logging with Morgan]
1818
endif::[]

docs/intro.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ See the {ecs-logging-ref}/intro.html[ECS logging guide].
2626

2727
Ready to jump into Node.js ECS logging?
2828

29-
- <<morgan,ECS Logging with Morgan>>
3029
- <<pino,ECS Logging with Pino>>
3130
- <<winston,ECS Logging with Winston>>
31+
- <<morgan,ECS Logging with Morgan>>
3232

3333
If you'd like to try out a tutorial using Node.js ECS logging with winston, see {cloud}/ec-getting-started-search-use-cases-node-logs.html[Ingest logs from a Node.js web application using Filebeat].

packages/ecs-helpers/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @elastic/ecs-helpers Changelog
22

3-
## 2.0.0
3+
## v2.0.0
44

55
- [Breaking change.] Drop the `serialize` method. Serialization will move to
66
the individual `@elastic/ecs-*-format` libraries -- and they will be

packages/ecs-morgan-format/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
# @elastic/ecs-morgan-format
44

5-
[![Build Status](https://apm-ci.elastic.co/buildStatus/icon?job=apm-agent-nodejs%2Fecs-logging-nodejs-mbp%2Fmain)](https://apm-ci.elastic.co/job/apm-agent-nodejs/job/ecs-logging-nodejs-mbp/job/main/) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)
5+
[![npm](https://img.shields.io/npm/v/@elastic/ecs-morgan-format.svg)](https://www.npmjs.com/package/@elastic/ecs-morgan-format)
6+
[![test](https://github.com/elastic/ecs-logging-nodejs/actions/workflows/test.yml/badge.svg)](https://github.com/elastic/ecs-logging-nodejs/actions/workflows/test.yml)
67

78
This Node.js package provides a formatter for the
8-
[morgan](https://www.npmjs.com/package/morgan) logging middleware compatible with
9-
[Elastic Common Schema (ECS) logging](https://www.elastic.co/guide/en/ecs-logging/overview/master/intro.html).<br/>
9+
[morgan](https://github.com/expressjs/morgan) logging middleware compatible with
10+
[Elastic Common Schema (ECS) logging](https://www.elastic.co/guide/en/ecs-logging/overview/master/intro.html).
1011
In combination with the [filebeat](https://www.elastic.co/products/beats/filebeat)
1112
shipper, you can send your logs directly to Elasticsearch and leverage
1213
[Kibana's Logs app](https://www.elastic.co/guide/en/observability/current/monitor-logs.html)

packages/ecs-pino-format/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
# @elastic/ecs-pino-format
44

5-
[![Build Status](https://apm-ci.elastic.co/buildStatus/icon?job=apm-agent-nodejs%2Fecs-logging-nodejs-mbp%2Fmain)](https://apm-ci.elastic.co/job/apm-agent-nodejs/job/ecs-logging-nodejs-mbp/job/main/) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)
5+
[![npm](https://img.shields.io/npm/v/@elastic/ecs-pino-format.svg)](https://www.npmjs.com/package/@elastic/ecs-pino-format)
6+
[![test](https://github.com/elastic/ecs-logging-nodejs/actions/workflows/test.yml/badge.svg)](https://github.com/elastic/ecs-logging-nodejs/actions/workflows/test.yml)
67

7-
This Node.js package provides a formatter for the [pino](https://www.npmjs.com/package/pino)
8-
logger compatible with [Elastic Common Schema (ECS) logging](https://www.elastic.co/guide/en/ecs/current/index.html).<br/>
8+
This Node.js package provides a formatter for the [pino](https://getpino.io/)
9+
logger compatible with [Elastic Common Schema (ECS) logging](https://www.elastic.co/guide/en/ecs/current/index.html).
910
In combination with the [filebeat](https://www.elastic.co/products/beats/filebeat)
1011
shipper, you can send your logs directly to Elasticsearch and leverage
1112
[Kibana's Logs app](https://www.elastic.co/guide/en/observability/current/monitor-logs.html)

packages/ecs-winston-format/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
# @elastic/ecs-winston-format
44

5-
[![Build Status](https://apm-ci.elastic.co/buildStatus/icon?job=apm-agent-nodejs%2Fecs-logging-nodejs-mbp%2Fmain)](https://apm-ci.elastic.co/job/apm-agent-nodejs/job/ecs-logging-nodejs-mbp/job/main/) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)
5+
[![npm](https://img.shields.io/npm/v/@elastic/ecs-winston-format.svg)](https://www.npmjs.com/package/@elastic/ecs-winston-format)
6+
[![test](https://github.com/elastic/ecs-logging-nodejs/actions/workflows/test.yml/badge.svg)](https://github.com/elastic/ecs-logging-nodejs/actions/workflows/test.yml)
67

78
This Node.js package provides a formatter for the
8-
[winston](https://www.npmjs.com/package/winston) logger compatible with
9-
[Elastic Common Schema (ECS) logging](https://www.elastic.co/guide/en/ecs-logging/overview/master/intro.html).<br/>
9+
[winston](https://github.com/winstonjs/winston) logger compatible with
10+
[Elastic Common Schema (ECS) logging](https://www.elastic.co/guide/en/ecs-logging/overview/master/intro.html).
1011
In combination with the [filebeat](https://www.elastic.co/products/beats/filebeat)
1112
shipper, you can send your logs directly to Elasticsearch and leverage
1213
[Kibana's Logs app](https://www.elastic.co/guide/en/observability/current/monitor-logs.html)

packages/ecs-winston-format/index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,17 @@ try {
3333
// Silently ignore.
3434
}
3535

36-
// There are some differences between Winston's `logform.format.json()` and this
37-
// stringifier. They both use `safe-stable-stringify`. Winston's exposes its
36+
// There are some differences between Winston's `logform.json()` and this
37+
// stringifier. They both use `safe-stable-stringify`. Winston exposes its
3838
// options but doesn't doc that at https://github.com/winstonjs/logform#json.
3939
// 1. This one hardcodes `deterministic: false` so fields are serialized in the
4040
// order added, which is helpful for ecs-logging's stated preference of
41-
// having a few fields first:
41+
// having a few specific fields first:
4242
// https://www.elastic.co/guide/en/ecs-logging/overview/current/intro.html#_why_ecs_logging
4343
// 2. Winston provides a `replacer` that converts bigints to strings. Doing
4444
// that is debatable. The argument *for* is that a *JavaScript* JSON parser
45-
// looses precision when parsing a bigint.
45+
// looses precision when parsing a bigint. This stringifier does *not*
46+
// do this same conversion.
4647
// TODO: These differences should make it to docs somewhere.
4748
const stringify = safeStableStringify.configure({ deterministic: false })
4849

0 commit comments

Comments
 (0)