aboutsummaryrefslogtreecommitdiffstats
path: root/funcs/func_db.c
diff options
context:
space:
mode:
Diffstat (limited to 'funcs/func_db.c')
-rw-r--r--funcs/func_db.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/funcs/func_db.c b/funcs/func_db.c
index 13932d27d..2ad135fa0 100644
--- a/funcs/func_db.c
+++ b/funcs/func_db.c
@@ -67,8 +67,9 @@ static int function_db_read(struct ast_channel *chan, char *cmd,
}
if (ast_db_get(args.family, args.key, buf, len - 1)) {
- ast_log(LOG_DEBUG, "DB: %s/%s not found in database.\n", args.family,
- args.key);
+ if (option_debug)
+ ast_log(LOG_DEBUG, "DB: %s/%s not found in database.\n", args.family,
+ args.key);
} else
pbx_builtin_setvar_helper(chan, "DB_RESULT", buf);
@@ -182,11 +183,13 @@ static int function_db_delete(struct ast_channel *chan, char* cmd,
}
if (ast_db_get(args.family, args.key, buf, len - 1)) {
- ast_log(LOG_DEBUG, "DB_DELETE: %s/%s not found in database.\n", args.family, args.key);
+ if (option_debug)
+ ast_log(LOG_DEBUG, "DB_DELETE: %s/%s not found in database.\n", args.family, args.key);
} else {
if (ast_db_del(args.family, args.key)) {
- ast_log(LOG_DEBUG, "DB_DELETE: %s/%s could not be deleted from the database\n",
- args.family, args.key);
+ if (option_debug)
+ ast_log(LOG_DEBUG, "DB_DELETE: %s/%s could not be deleted from the database\n",
+ args.family, args.key);
}
}
pbx_builtin_setvar_helper(chan, "DB_RESULT", buf);