3 ms·
Why not have the program write logs to a temp file somewhere at trace/debug level, and only output the standard level to the console?
by Jowsey 5y ago
Why not have the program write logs to a temp file somewhere at trace/debug level, and only output the standard level to the console?
- Cicero22 5y agoWouldn't that end up slowing down the whole system from writing to a file though?
- Jowsey 5y agoAh, suppose it depends on how much you're doing and/or how verbose your logs are. If you've got lines speeding past then yeah I maybe wouldn't write them all.
- grey-area 5y agoWriting verbose logs is very expensive.
- worik 5y agoIt depends which costs what. In a case where there are plenty of resources and the thing you are logging is very heavy then even verbose logging is trivial. If you are beset by failures it is much cheaper than making your developers guess.