Here's what we did in one project I worked on. It's not the bible of logging levels, just one possibility. Logging should be fitted to your situation.
- LOG_SEVERE, severe errors that require program exit (e.g., in an application, you ran out of disk space).
- LOG_ERROR, error messages that can't be recovered from but the program can continue to run (e.g., in a server application, client sent through bad data but other clients can continue to run).
- LOG_WARNING, recoverable problem that you should be notified about (e.g., invalid value in a configuration file, so you fell back to the default).
- LOG_INFO, informational messages.
- LOG_ENTRY, log entry and exit to all functions.
- LOG_PARM, log entry and exit to all functions with parameters passed and values returned (including global effects if any).
- LOG_DEBUG, general debugging messages, basically useful information that can be output on a single line.
- LOG_HIDEBUG, far more detailed debugging messages such as hex dumps of buffers.
Each level also logged messages in 'lower' levels. There was sometimes a question as to whether a debug message should be LOG_DEBUG or LOG_HIDEBUG but we mostly based it on the number of lines it would push out to the log file.