From 69be506311809022b2233ff0385a83f874b2b9fc Mon Sep 17 00:00:00 2001 From: Alexey Melnichuk Date: Tue, 2 Feb 2016 19:32:27 +0300 Subject: [PATCH] Add. debug message to log. --- .../resources/scripts/dialplan/dialplan.lua | 10 ++++++++++ resources/install/scripts/resources/functions/log.lua | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/resources/install/scripts/app/xml_handler/resources/scripts/dialplan/dialplan.lua b/resources/install/scripts/app/xml_handler/resources/scripts/dialplan/dialplan.lua index 1925250d38..55f479aed5 100644 --- a/resources/install/scripts/app/xml_handler/resources/scripts/dialplan/dialplan.lua +++ b/resources/install/scripts/app/xml_handler/resources/scripts/dialplan/dialplan.lua @@ -292,6 +292,16 @@ -- prevent partial dialplan (pass=nil may be error in sql or empty resultset) if pass == false then + log.errf('context: %s, extension: %s, type: %s, data: %s ', + call_context, + dialplan_name or '----', + dialplan_detail_tag or '----', + dialplan_detail_data or '----' + ) + + --close the database connection + dbh:release(); + error('error while build context: ' .. call_context) end diff --git a/resources/install/scripts/resources/functions/log.lua b/resources/install/scripts/resources/functions/log.lua index eb73e5c13c..5b60091484 100644 --- a/resources/install/scripts/resources/functions/log.lua +++ b/resources/install/scripts/resources/functions/log.lua @@ -42,7 +42,7 @@ local function tracef(type, name, level, ...) end local LEVELS = { - 'error', + 'err', 'warning', 'notice', 'info',