Here's what ns_log offers for
logging levels:
- Notice: Something interesting occurred.
- Warning: Something that could mean something bad occurred.
- Error: Something bad occurred.
- Fatal: Something extremely bad occurred. The server will shut down after logging the message.
- Bug: Something occurred that implies that there is a bug in the code.
- Debug: If the server is in Debug mode, the message is printed. Debug mode is specified in the [ns/parameters] section of the configuration file. Otherwise, the message is not printed.
I think most people who have written a line of ACS code, especially when using db drivers that don't pass back SQL error messages (now fixed), are familiar with opening the error log to hunt through hundreds of lines for the information they need. This seems to be in large part due to developers who have used Notice when they should have used Debug. At least, that's the assumption I've been working under while going through the code and changing a bunch of ns_log Notices to ns_log Debug in Notifications, acs-mail, and other notorious log spammers. Two questions:
First, does anybody think that automated processes - sweeps, etc - should write notices instead of debugs? Is there a case where the benefit to that outweighs the cost (making the log hard to use for anything else, eating up disk space) and it's not realistic to switch the server to debug mode?
Second, there are still about 300 ns_log notices in the core package. That seems like too many, although only the recurring ones are really offensive in terms of rendering the log less useful. How many of these are actually "interesting" in routine use? Could most of them be changed to Debugs, warnings, bugs, etc? If we could agree on a better criterion than "Something interesting occurred," this would be a good worker-bee task.