Use the instatiation of the console object as a one place flag for turning off all console.log() #1047
-
Hi,
The idea is that sometimes I need those logs and some other times I want a cleaner output on my terminal. Currently for what I know about this library, my only option is to comment out every line where I have a console.log(). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi Dario, I'd recommend you use the logging module disabling log output. You can use Rich logging handler to keep the styled output. If you really can't live without disabling console.log = lambda *args, **kwargs: None |
Beta Was this translation helpful? Give feedback.
Hi Dario,
I'd recommend you use the logging module disabling log output. You can use Rich logging handler to keep the styled output.
If you really can't live without disabling
console.log
, you could do this: