File tree Expand file tree Collapse file tree 2 files changed +2
-17
lines changed Expand file tree Collapse file tree 2 files changed +2
-17
lines changed Original file line number Diff line number Diff line change 1
- import tracer from "dd-trace" ;
2
- import formats from "dd-trace/ext/formats" ;
3
1
4
2
export class BuffLog {
5
3
pinoLogger : any ;
6
- defaultLevel = String . prototype . toLowerCase . apply ( process . env . LOG_LEVEL ) || "notice" ; ;
4
+ defaultLevel = process . env . LOG_LEVEL ? String . prototype . toLowerCase . apply ( process . env . LOG_LEVEL ) : "notice" ;
7
5
8
6
constructor ( ) {
9
7
this . pinoLogger = require ( 'pino' ) ( {
@@ -16,19 +14,6 @@ export class BuffLog {
16
14
// soon: remove the `v` field https://github.com/pinojs/pino/issues/620
17
15
base : { } ,
18
16
19
- mixin ( ) {
20
- // Check here if a current trace exist to inject it in the log
21
- // `tracer` is a singleton, will no-op if no tracer was initialized
22
- var span = tracer . scope ( ) . active ( )
23
- if ( span ) {
24
- const traceInfo = { }
25
- tracer . inject ( span . context ( ) , formats . LOG , traceInfo ) ;
26
- return traceInfo ;
27
- } else {
28
- return { }
29
- }
30
- } ,
31
-
32
17
// notice doesn't exist in pino, let's add it
33
18
customLevels : {
34
19
notice : 35
Original file line number Diff line number Diff line change 1
1
import tracer from "dd-trace" ;
2
2
import express from 'express' ;
3
- import bufflog from './bufflog' ;
3
+ import bufflog from './bufflog' ;
4
4
5
5
tracer . init ( {
6
6
hostname : "dd-agent-hostname" ,
You can’t perform that action at this time.
0 commit comments