Skip to content

Commit 26aaa6a

Browse files
authored
update branch to main (#111)
1 parent 9b965d1 commit 26aaa6a

File tree

13 files changed

+22
-22
lines changed

13 files changed

+22
-22
lines changed

README.md

Lines changed: 1 addition & 1 deletion
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%2Fmaster)](https://apm-ci.elastic.co/job/apm-agent-nodejs/job/ecs-logging-nodejs-mbp/job/master/) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)
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/)
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.

docs/morgan.asciidoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ app.get('/error', function (req, res, next) {
7474
app.listen(3000)
7575
----
7676

77-
Running this script (the full example is https://github.com/elastic/ecs-logging-nodejs/blob/master/loggers/morgan/examples/express.js[here])
77+
Running this script (the full example is https://github.com/elastic/ecs-logging-nodejs/blob/main/loggers/morgan/examples/express.js[here])
7878
and making a request (via `curl -i localhost:3000/`) will produce log output
7979
similar to the following:
8080

@@ -144,7 +144,7 @@ app.use(morgan(ecsFormat({ format: 'tiny' }))) <1>
144144
=== log.level
145145

146146
The `log.level` field will be "error" for response codes >= 500, otherwise
147-
"info". For example, running https://github.com/elastic/ecs-logging-nodejs/blob/master/loggers/morgan/examples/express.js[examples/express.js]
147+
"info". For example, running https://github.com/elastic/ecs-logging-nodejs/blob/main/loggers/morgan/examples/express.js[examples/express.js]
148148
again, a `curl -i localhost:3000/error` will yield:
149149

150150
[source,cmd]
@@ -172,7 +172,7 @@ then fields are added to log records that {ecs-ref}/ecs-tracing.html[identify an
172172
These fields allow cross linking between traces and logs in Kibana and support
173173
log anomaly detection.
174174

175-
For example, running https://github.com/elastic/ecs-logging-nodejs/blob/master/loggers/morgan/examples/express-with-apm.js[examples/express-with-apm.js] and `curl -i localhost:3000/` results in a log record with the following:
175+
For example, running https://github.com/elastic/ecs-logging-nodejs/blob/main/loggers/morgan/examples/express-with-apm.js[examples/express-with-apm.js] and `curl -i localhost:3000/` results in a log record with the following:
176176

177177
[source,cmd]
178178
----

docs/pino.asciidoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,10 @@ For example:
196196
}
197197
----
198198

199-
The https://github.com/elastic/ecs-logging-nodejs/tree/master/loggers/pino/examples[examples/ directory]
199+
The https://github.com/elastic/ecs-logging-nodejs/tree/main/loggers/pino/examples[examples/ directory]
200200
shows sample programs using request and response logging:
201-
https://github.com/elastic/ecs-logging-nodejs/tree/master/loggers/pino/examples/express-simple.js[with Express],
202-
https://github.com/elastic/ecs-logging-nodejs/tree/master/loggers/pino/examples/express-with-pino-http.js[with the pino-http middleware package],
201+
https://github.com/elastic/ecs-logging-nodejs/tree/main/loggers/pino/examples/express-simple.js[with Express],
202+
https://github.com/elastic/ecs-logging-nodejs/tree/main/loggers/pino/examples/express-with-pino-http.js[with the pino-http middleware package],
203203
etc.
204204

205205

@@ -214,7 +214,7 @@ then fields are added to log records that {ecs-ref}/ecs-tracing.html[identify an
214214
These fields allow cross linking between traces and logs in Kibana and support
215215
log anomaly detection.
216216

217-
For example, running https://github.com/elastic/ecs-logging-nodejs/blob/master/loggers/pino/examples/http-with-elastic-apm.js[examples/http-with-elastic-apm.js] and `curl -i localhost:3000/` results in a log record with the following:
217+
For example, running https://github.com/elastic/ecs-logging-nodejs/blob/main/loggers/pino/examples/http-with-elastic-apm.js[examples/http-with-elastic-apm.js] and `curl -i localhost:3000/` results in a log record with the following:
218218

219219
[source,cmd]
220220
----
@@ -253,7 +253,7 @@ const log = pino(ecsFormat({ apmIntegration: false }))
253253
[[pino-considerations]]
254254
=== Limitations and Considerations
255255

256-
The https://github.com/elastic/ecs-logging/tree/master/spec[ecs-logging spec]
256+
The https://github.com/elastic/ecs-logging/tree/main/spec[ecs-logging spec]
257257
suggests that the first three fields in log records must be `@timestamp`,
258258
`log.level`, and `message`. Pino does not provide a mechanism to put
259259
the `message` field near the front. Given that ordering of ecs-logging fields

docs/winston.asciidoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ logger.info('hi')
7373
logger.error('oops there is a problem', { foo: 'bar' })
7474
----
7575

76-
Running this script (available https://github.com/elastic/ecs-logging-nodejs/blob/master/loggers/winston/examples/basic.js[here]) will produce log output similar to the following:
76+
Running this script (available https://github.com/elastic/ecs-logging-nodejs/blob/main/loggers/winston/examples/basic.js[here]) will produce log output similar to the following:
7777

7878
[source,cmd]
7979
----
@@ -94,7 +94,7 @@ the https://github.com/winstonjs/logform#timestamp[timestamp] formatter.
9494

9595
By default, the formatter will convert an `err` meta field that is an Error instance
9696
to {ecs-ref}/ecs-error.html[ECS Error fields].
97-
For https://github.com/elastic/ecs-logging-nodejs/blob/master/loggers/winston/examples/error.js[example]:
97+
For https://github.com/elastic/ecs-logging-nodejs/blob/main/loggers/winston/examples/error.js[example]:
9898

9999
[source,js]
100100
----
@@ -182,7 +182,7 @@ function handler (req, res) {
182182

183183
This will produce logs with request and response info using
184184
{ecs-ref}/ecs-http.html[ECS HTTP fields].
185-
For https://github.com/elastic/ecs-logging-nodejs/blob/master/loggers/winston/examples/http.js[example]:
185+
For https://github.com/elastic/ecs-logging-nodejs/blob/main/loggers/winston/examples/http.js[example]:
186186

187187
[source,cmd]
188188
----
@@ -233,7 +233,7 @@ then fields are added to log records that {ecs-ref}/ecs-tracing.html[identify an
233233
These fields allow cross linking between traces and logs in Kibana and support
234234
log anomaly detection.
235235

236-
For example, running https://github.com/elastic/ecs-logging-nodejs/blob/master/loggers/winston/examples/http-with-elastic-apm.js[examples/http-with-elastic-apm.js] and `curl -i localhost:3000/` results in a log record with the following:
236+
For example, running https://github.com/elastic/ecs-logging-nodejs/blob/main/loggers/winston/examples/http-with-elastic-apm.js[examples/http-with-elastic-apm.js] and `curl -i localhost:3000/` results in a log record with the following:
237237

238238
[source,cmd]
239239
----

helpers/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# @elastic/ecs-helpers
44

5-
[![Build Status](https://apm-ci.elastic.co/buildStatus/icon?job=apm-agent-nodejs%2Fecs-logging-nodejs-mbp%2Fmaster)](https://apm-ci.elastic.co/job/apm-agent-nodejs/job/ecs-logging-nodejs-mbp/job/master/) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)
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/)
66

77
A set of helpers for the ECS logging libraries. You should not directly used
88
this package, but the [ECS logging libraries](../loggers) instead.

helpers/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"bugs": {
1616
"url": "https://github.com/elastic/ecs-logging-nodejs/issues"
1717
},
18-
"homepage": "https://github.com/elastic/ecs-logging-nodejs/blob/master/helpers/README.md",
18+
"homepage": "https://github.com/elastic/ecs-logging-nodejs/blob/main/helpers/README.md",
1919
"scripts": {
2020
"test": "standard && tap --no-check-coverage --timeout ${TAP_TIMEOUT:-10} test/*.test.js"
2121
},

loggers/morgan/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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%2Fmaster)](https://apm-ci.elastic.co/job/apm-agent-nodejs/job/ecs-logging-nodejs-mbp/job/master/) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)
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/)
66

77
This Node.js package provides a formatter for the
88
[morgan](https://www.npmjs.com/package/morgan) logging middleware compatible with

loggers/morgan/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"bugs": {
2828
"url": "https://github.com/elastic/ecs-logging-nodejs/issues"
2929
},
30-
"homepage": "https://github.com/elastic/ecs-logging-nodejs/blob/master/loggers/morgan/README.md",
30+
"homepage": "https://github.com/elastic/ecs-logging-nodejs/blob/main/loggers/morgan/README.md",
3131
"scripts": {
3232
"test": "standard && tap --timeout ${TAP_TIMEOUT:-10} test/*.test.js"
3333
},

loggers/pino/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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%2Fmaster)](https://apm-ci.elastic.co/job/apm-agent-nodejs/job/ecs-logging-nodejs-mbp/job/master/) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)
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/)
66

77
This Node.js package provides a formatter for the [pino](https://www.npmjs.com/package/pino)
88
logger compatible with [Elastic Common Schema (ECS) logging](https://www.elastic.co/guide/en/ecs/current/index.html).<br/>

loggers/pino/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ function createEcsPinoOptions (opts) {
161161
// A mis-configured APM Agent can be "started" but not have a
162162
// "serviceName".
163163
if (apmServiceName) {
164-
// Per https://github.com/elastic/ecs-logging/blob/master/spec/spec.json
164+
// Per https://github.com/elastic/ecs-logging/blob/main/spec/spec.json
165165
// "service.name" and "event.dataset" should be automatically set
166166
// if not already by the user.
167167
if (!isServiceNameInBindings) {

0 commit comments

Comments
 (0)