3 ms·
> The problem with logging is that you have to know where to log. I start with basic lifecycle logging, at an INFO level: The FooBar is created, the FooBar is
by geophile 4y ago
> The problem with logging is that you have to know where to log.
I start with basic lifecycle logging, at an INFO level: The FooBar is created, the FooBar is destroyed, and major states in between. If a FooBar manages a set of things, then I might also add DEBUG level logging for operations on those things. But mostly, detailed logging comes later, as I investigate problems. You really can't anticipate too much logging, because you don't know what's going to need it.