Skip to content

Commit

Permalink
fix: check set log level if true
Browse files Browse the repository at this point in the history
  • Loading branch information
Orkuncakilkaya committed May 10, 2024
1 parent a02fbf9 commit 15d9d53
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions proxy/utils/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { getHeaderValue } from './headers'
*/
export function setLogLevel(request?: CloudFrontRequest) {
const debugValue = request ? getHeaderValue(request, 'fpjs_debug') : undefined
if (!debugValue) {
console.debug = () => null
if (debugValue === 'true') {
return

Check warning on line 11 in proxy/utils/log.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement
}

Check warning on line 12 in proxy/utils/log.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch
console.debug = () => null
}

0 comments on commit 15d9d53

Please sign in to comment.