-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
pino-stackdriver.d.ts
52 lines (45 loc) · 1.26 KB
/
pino-stackdriver.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/// <reference types="node" />
declare namespace PinoStackdriver {
export interface Options {
/**
* Full path to the JSON file containing the Google Service Credentials.
* Defaults to GOOGLE_APPLICATION_CREDENTIALS environment variable.
*/
credentials?: string | {client_email: string, private_key:string};
/**
* The name of the project.
*/
projectId: string;
/**
* The name of the log.
* @default "pino_log"
*/
logName?: string;
/**
* The MonitoringResource to send logs to.
* @default { type: "global" }
*/
resource?: {
type: string;
labels?: Record<string, string>;
};
/**
* Names of log fields to pull properties out of - see https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry
* @default { httpRequest: "httpRequest", trace: "trace", ... }
*/
keys?: {
httpRequest?: string;
trace?: string;
};
/**
* Set the gRPC fallback option for the Google Stackdriver API.
*/
fallback?: boolean;
}
/**
* Create a writestream that `pino-multi-stream` can use to send logs to.
* @param options
*/
export const createWriteStream: (options: Options) => NodeJS.WritableStream;
}
export = PinoStackdriver