user1873073
user1873073

Reputation: 3660

How do you make the Chrome Developer Tools only show your console.log?

It adds logs when plugins say something. It adds logs when it gets anything from the cache manifest. It logs HTTP information sometimes.

My 1 little log gets flooded by 10,000 logs I don't need or want.

Upvotes: 2

Views: 5279

Answers (2)

Rashmika Gamage
Rashmika Gamage

Reputation: 23

on the Console tab select No info on the left Hand I have attached a screenshot here You should update to the google chrome latest version

Upvotes: 2

Harry Dobrev
Harry Dobrev

Reputation: 7706

Use only in development:

(function(){
    var originalConsole = window.console;

    window.console = {};
    window.console.log = window.console.debug = window.console.error = function(){};

    window.myLog = function() {
        originalConsole.log.apply(originalConsole, arguments);
    };
}());

This will save a local copy of the original window.console object.

It will change the original window.console object to use empty functions.

And finally it will define a global myLog function which will use the local copy of the original window.console to actually log stuff.

This way all the other code will use the useless console.log() and your code could use myLog().

Upvotes: 1

Related Questions