File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 1
1
import { z } from "zod" ;
2
- import { pino } from " pino" ;
2
+ import { pino } from ' pino' ;
3
3
const DEFAULT_NULL = process . env . DEFAULT_NULL === "true" ;
4
4
5
+
5
6
const logger = pino ( {
6
- level : process . env . LOG_LEVEL || " info" ,
7
+ level : process . env . LOG_LEVEL || ' info' ,
7
8
transport : {
8
- target : " pino-pretty" ,
9
+ target : ' pino-pretty' ,
9
10
options : {
10
11
colorize : true ,
11
12
levelFirst : true ,
@@ -24,9 +25,7 @@ export const flexibleBoolean = z.preprocess(val => {
24
25
} catch {
25
26
return false ;
26
27
}
27
- return result in [ "true" , "t" , "1" ] ;
28
+ return [ "true" , "t" , "1" ] . includes ( result ) ;
28
29
} , z . boolean ( ) ) ;
29
30
30
- export const flexibleBooleanNullable = DEFAULT_NULL
31
- ? flexibleBoolean . nullable ( ) . default ( null )
32
- : flexibleBoolean . nullable ( ) ;
31
+ export const flexibleBooleanNullable = DEFAULT_NULL ? flexibleBoolean . nullable ( ) . default ( null ) : flexibleBoolean . nullable ( ) ;
You can’t perform that action at this time.
0 commit comments