2 ms·
I once refactored a server-side codebase due to poor performance, and a significant time suck was - I kid you not - this line (in pseudocode): logger.info(“Req
by shermantanktop 2y ago
I once refactored a server-side codebase due to poor performance, and a significant time suck was - I kid you not - this line (in pseudocode):
logger.info(“Request:” + JSON.stringify(httpRequest));
Terrible! I removed it, deployed it, and…alarms went off. It turned out that the line in question was being used to populate a critical metrics feed.
In that terrible, terrible case, I agree that the load-bearing log line should be tested. In any other scenario I’d personally avoid it, outside of mission critical medical or other codebases. But that’s me, I understand the impulse to test it.