Skip to content

Commit 96303c4

Browse files
committed
Pino: Add stack context hint
1 parent 45e3978 commit 96303c4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/pino/src/pino.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ export interface IPinoLogtailOptions {
2020
options: Partial<ILogtailOptions>
2121
}
2222

23+
const stackContextHint = { fileName: "node_modules/pino", methodNames: [ 'log', 'fatal', 'error', 'warn', 'info', 'debug', 'trace', 'silent' ] };
24+
2325
export async function logtailTransport(options: IPinoLogtailOptions) {
2426
const logtail = new Logtail(options.sourceToken, options.options)
2527

@@ -58,7 +60,7 @@ export async function logtailTransport(options: IPinoLogtailOptions) {
5860
}
5961

6062
// Log to Logtail
61-
logtail.log(obj.msg, level, meta);
63+
logtail.log(obj.msg, level, meta, stackContextHint as StackContextHint);
6264
}
6365
};
6466
const closeFunc = async () => {

0 commit comments

Comments
 (0)