Does anybody have any advice on how to minimize my logs for a web application?
Right now, I'm logging every error. So if there is a situation where an error occurs on every request (a db connection problem for example), it might get logged for every user on every request. As you can imagine, it doesn't take too many users doing too many things to start amassing a huge log file with redundant log errors.
It has occurred to me to create some type of flagging mechanism to not log the same error within N minutes. I don't like this for 2 reason; 1) it could hide the most significant problem amongst the others and 2) cascading errors may not log their error trail properly, omitting previously logged errors, potentially throwing off my initial diagnosis.
I'm sure I'm not the first person to have this issue ... does anybody have any advice on how to reduce redundant log messages for a web-app?