File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed
infrastructure/environments/prod Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ locals {
2121 application_environment_variables = {
2222 SSM_PREFIX = " /${ local . prefix } /"
2323
24- PINO_LOG_LEVEL = " warn "
24+ PINO_LOG_LEVEL = " error "
2525 DEPLOY_ENVIRONMENT = local.environment
2626 PROFILE_PERFORMANCE = " false"
2727
Original file line number Diff line number Diff line change @@ -13,14 +13,16 @@ const profilePerformanceStart = (markerName: string) => {
1313const profilePerformanceEnd = ( markerName : string ) => {
1414 if ( isPerformanceProfilingEnabled ) {
1515 const measurement = performance . measure ( `${ markerName } -latency` , markerName ) ;
16- log . info (
17- {
18- marker : measurement . name ,
19- startTimestamp : measurement . startTime ,
20- latencyMillis : measurement . duration ,
21- } ,
22- "performance profile" ,
23- ) ;
16+ const message = {
17+ marker : measurement . name ,
18+ startTimestamp : measurement . startTime ,
19+ latencyMillis : measurement . duration ,
20+ } ;
21+ if ( process . env . PINO_LOG_LEVEL === "info" ) {
22+ log . info ( message , "performance profile" ) ;
23+ } else {
24+ log . warn ( message , "performance profile" ) ;
25+ }
2426 }
2527} ;
2628
You can’t perform that action at this time.
0 commit comments