forked from elastic/ecs-logging-nodejs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
32 lines (29 loc) · 982 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import type { Logform } from "winston";
interface Config {
/**
* Whether to convert a logged `err` field to ECS error fields.
* Default true.
*/
convertErr?: boolean;
/**
* Whether to convert logged `req` and `res` HTTP request and response fields
* to ECS HTTP, User agent, and URL fields. Default false.
*/
convertReqRes?: boolean;
/**
* Whether to automatically integrate with
* Elastic APM (https://github.com/elastic/apm-agent-nodejs). If a started
* APM agent is detected, then log records will include the following
* fields:
*
* - "service.name" - the configured serviceName in the agent
* - "event.dataset" - set to "$serviceName.log" for correlation in Kibana
* - "trace.id", "transaction.id", and "span.id" - if there is a current
* active trace when the log call is made
*
* Default true.
*/
apmIntegration?: boolean;
}
declare function ecsFormat(opts?: Config): Logform.Format;
export = ecsFormat;