(2007-08-31) Log Everything
Todd Hoff recommends Logging everything. You don't need function/method traces. You need a log of all the interesting things that happened in the system. Knowing "func1" was called is of no help. You need to know all the parameters that were passed to the function. You need to know the return value from the function. Along with anything else interesting it did... For example, every request needs to have assigned to it a globally unique sequence number that is passed with every operation related to the request so all work for a request can be tied together... Every hop a request takes should log meta information about how long the request took to process, how big the request was, what the status of the request was... I am not being completely honest when I say there are no debugging levels. There are two levels: system and developer. System is logging everything you need to log to debug the system. It is never turned off. There is no need. It always on. Developers can add more detailed log levels for their code that can be turned on and off on a module by module basis... I can hear many of you saying this is too inefficient. We could never log all that data! That's crazy! No true. I've worked on very sensitive high performance real-time embedded systems where every nanosecond was dear and they still had very high levels of logging, even in driver land. It's in how you do it. You would be right if you logged everything within the same thread directly to disk... I Commented with a couple questions.
Edited: | Tweet this! | Search Twitter for discussion
BackLinks: KHole
No twinpages!