javascript - Efficient logging in JS -


is there way in js make logging more efficient , without calling methods when not necessary use macros in c++ this.

lets have logger , log('warning', 'this object' , json.parse(obj));

i dont want json.parse called if log level below warning.

is there way way around had of thought of somehow encapsulating function call , logger calling function inside result think overhead of creating function each time not worth it. thoughts ? thanks.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -