@@ -13,7 +13,7 @@ const customLevels: Record<string, number> = {
13
13
trace : 10 ,
14
14
} ;
15
15
16
- const raw = process ?. env ?. LOG_JSON_FORMAT ? true : false ;
16
+ const raw = process ?. env ?. LOG_JSON_FORMAT || false ;
17
17
18
18
const createStream = ( ) => {
19
19
if ( raw ) {
@@ -36,20 +36,22 @@ const options = {
36
36
const [ arg1 , ...rest ] = inputArgs ;
37
37
38
38
if ( typeof arg1 === "object" ) {
39
- const messageParts = rest . map ( arg =>
39
+ const messageParts = rest . map ( ( arg ) =>
40
40
typeof arg === "string" ? arg : JSON . stringify ( arg )
41
41
) ;
42
42
const message = messageParts . join ( " " ) ;
43
43
return method . apply ( this , [ arg1 , message ] ) ;
44
44
} else {
45
45
const context = { } ;
46
- const messageParts = [ arg1 , ...rest ] . map ( arg =>
46
+ const messageParts = [ arg1 , ...rest ] . map ( ( arg ) =>
47
47
typeof arg === "string" ? arg : arg
48
48
) ;
49
49
const message = messageParts
50
- . filter ( part => typeof part === "string" )
50
+ . filter ( ( part ) => typeof part === "string" )
51
51
. join ( " " ) ;
52
- const jsonParts = messageParts . filter ( part => typeof part === "object" ) ;
52
+ const jsonParts = messageParts . filter (
53
+ ( part ) => typeof part === "object"
54
+ ) ;
53
55
54
56
Object . assign ( context , ...jsonParts ) ;
55
57
0 commit comments