This changes the mapping of internal log levels to syslog priorities to
match the previously defined helper macros. The idea is that this better
maps to the actual use of log levels in the Samba code.
unchanged
log level | priority
0 | ERROR
1 | WARNING
2 | NOTICE
before
log level | priority
3 | INFO
4 and higher | DEBUG
after
log level | priority
3 to 5 | NOTICE
6 to 9 | INFO
10 and higher | DEBUG
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
static int debug_level_to_priority(int level)
{
/*
- * map debug levels to syslog() priorities note that not all
- * DEBUG(0, ...) calls are necessarily errors
+ * map debug levels to syslog() priorities
*/
- static const int priority_map[4] = {
+ static const int priority_map[] = {
LOG_ERR, /* 0 */
LOG_WARNING, /* 1 */
LOG_NOTICE, /* 2 */
- LOG_INFO, /* 3 */
+ LOG_NOTICE, /* 3 */
+ LOG_NOTICE, /* 4 */
+ LOG_NOTICE, /* 5 */
+ LOG_INFO, /* 6 */
+ LOG_INFO, /* 7 */
+ LOG_INFO, /* 8 */
+ LOG_INFO, /* 9 */
};
int priority;