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
Post a Comment