Skip to content

Commit

Permalink
Fix log levels
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Jan 5, 2015
1 parent ec0ad10 commit 59a53ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/log.c
Expand Up @@ -506,7 +506,7 @@ static int CC_HINT(format (printf, 2, 3)) radlog_always(log_type_t type, char co

inline bool debug_enabled(log_type_t type, log_lvl_t lvl)
{
if ((type & L_DBG) && (debug_flag != 0) && (lvl < debug_flag)) return true;
if ((type & L_DBG) && (debug_flag != 0) && (lvl <= debug_flag)) return true;

return false;
}
Expand All @@ -531,8 +531,8 @@ inline bool radlog_debug_enabled(log_type_t type, log_lvl_t lvl, REQUEST *reques
* then don't log the message.
*/
if ((type & L_DBG) &&
((request && request->log.func && (lvl < request->log.lvl)) ||
((debug_flag != 0) && (lvl < debug_flag)))) {
((request && request->log.func && (lvl <= request->log.lvl)) ||
((debug_flag != 0) && (lvl <= debug_flag)))) {
return true;
}

Expand Down

0 comments on commit 59a53ea

Please sign in to comment.