diff options
author | Corey Farrell <git@cfware.com> | 2018-03-07 15:36:17 -0500 |
---|---|---|
committer | Corey Farrell <git@cfware.com> | 2018-03-07 16:03:01 -0600 |
commit | c8a521b6c804d66abb367783dba75eecb16889a2 (patch) | |
tree | cd017f42216be9712f6b38cacffd8d6a67484844 /cdr/cdr_pgsql.c | |
parent | 9040057db38dbc3d8181a5405d13ed8c8083d438 (diff) |
Replace direct checks of option_debug with DEBUG_ATLEAST macro.
Checking option_debug directly is incorrect as it ignores file/module
specific debug settings. This system-wide change replaces nearly all
direct checks for option_debug with the DEBUG_ATLEAST macro.
Change-Id: Ic342d4799a945dbc40ac085ac142681094a4ebf0
Diffstat (limited to 'cdr/cdr_pgsql.c')
-rw-r--r-- | cdr/cdr_pgsql.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/cdr/cdr_pgsql.c b/cdr/cdr_pgsql.c index b482fe6c8..3af9b4b3b 100644 --- a/cdr/cdr_pgsql.c +++ b/cdr/cdr_pgsql.c @@ -644,20 +644,20 @@ static int config_module(int reload) return -1; } - if (option_debug) { + if (DEBUG_ATLEAST(1)) { if (ast_strlen_zero(pghostname)) { - ast_debug(1, "using default unix socket\n"); + ast_log(LOG_DEBUG, "using default unix socket\n"); } else { - ast_debug(1, "got hostname of %s\n", pghostname); + ast_log(LOG_DEBUG, "got hostname of %s\n", pghostname); } - ast_debug(1, "got port of %s\n", pgdbport); - ast_debug(1, "got user of %s\n", pgdbuser); - ast_debug(1, "got dbname of %s\n", pgdbname); - ast_debug(1, "got password of %s\n", pgpassword); - ast_debug(1, "got application name of %s\n", pgappname); - ast_debug(1, "got sql table name of %s\n", table); - ast_debug(1, "got encoding of %s\n", encoding); - ast_debug(1, "got timezone of %s\n", tz); + ast_log(LOG_DEBUG, "got port of %s\n", pgdbport); + ast_log(LOG_DEBUG, "got user of %s\n", pgdbuser); + ast_log(LOG_DEBUG, "got dbname of %s\n", pgdbname); + ast_log(LOG_DEBUG, "got password of %s\n", pgpassword); + ast_log(LOG_DEBUG, "got application name of %s\n", pgappname); + ast_log(LOG_DEBUG, "got sql table name of %s\n", table); + ast_log(LOG_DEBUG, "got encoding of %s\n", encoding); + ast_log(LOG_DEBUG, "got timezone of %s\n", tz); } pgsql_reconnect(); |