Log files from servers and other programs can be an invaluable debugging tool. Really good and detailed logging can make it very easy to pin-point the trigger for a bug.

Unless there is a bug, log files are a useless waste of computing resources. A colleague told me that an app he uses produces 20+ megabytes of log files per day in normal use. That's insane.

What is needed is a way to have log files have happened when a bug manifests itself, but otherwise not.

I should perhaps become a quantum physicist to solve this problem properly, but meanwhile it might be enough to have really fast rotation of debug logs. Say, once an hour.