chore: disable console methods only on prod
This commit is contained in:
parent
6d44e67a45
commit
b7ada8bbdf
1 changed files with 3 additions and 1 deletions
|
|
@ -13,7 +13,9 @@ import { MostraGuarda } from './source/MostraGuarda';
|
|||
import { Soaper } from './source/Soaper';
|
||||
import { contextFromRequestAndResponse, envGet, envIsProd, Fetcher, StreamResolver } from './utils';
|
||||
|
||||
console.log = console.warn = console.error = console.info = console.debug = () => { /* disable in favor of logger */ };
|
||||
if (envIsProd()) {
|
||||
console.log = console.warn = console.error = console.info = console.debug = () => { /* disable in favor of logger */ };
|
||||
}
|
||||
|
||||
const logger = winston.createLogger({
|
||||
transports: [
|
||||
|
|
|
|||
Loading…
Reference in a new issue