News for hackers. Stuff that matters.
Re:Holding a Program in One's Head (2007) by jimbokun on Wednesday September 18, 2024 @05:14PM (#41585605)
For large systems the cost of maintaining all of those logs in a searchable system can be prohibitive.
Re:Holding a Program in One's Head (2007) by lanstin on Wednesday September 18, 2024 @06:32PM (#41586323)
Just reduce the time horizon you keep the logs until you can afford it. Also, as he mentioned, once a system is getting bugs infrequently, you can lower the log level. My standard is to have a log msg for each branch in the code. In C, I would use macros to also have a count of all the fmt strings the log package encountered (so I still got a sort of profile of the logic flows encountered, but not have the sprintf expense), but I haven't figured out an efficient way to do that in Go yet (i.e. not using introspection).