Answer the question
In order to leave comments, you need to log in
How to disable output to the console?
There is one module that uses the console too much while working. I would like it to do its work more quietly, and the possibility of accurate logging was left only to me. Can I somehow temporarily disable the output to the console, and then return it back?
Answer the question
In order to leave comments, you need to log in
can be overriddenconsole.log
let debug = 1;
let logger = function(a,b) { if ( debug == 1 ) console.log(a, b || "")};
logger("my", "log");
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question