Unless you’re me, you’re less awesome than you think you are.
(I’m more awesome than I think I am. This is not a paradox)
Therefore, when you write a mission-critical piece of code, you need a logging system
Your logging system needs to have different types or log message: error and debug at the bare minimum.
Your code needs to log every action it takes.
This might be expensive or difficult. Tough shit. If it’s important, it needs to be logged – you must be able to go back over a particular execution and determine what happened. This is not optional.
This is a good rule even for not-important code. It makes debugging SO much easier. There are approximately 100 billion logging systems available, use a library if you must. Or you could write your own in 10 minutes.
Let’s discuss! Give me an example of a situation where logging is undesirable for important code, and I’ll tell you why you’re wrong…