[svn-commits] mnicholson: testsuite/asterisk/trunk r381 - /asterisk/trunk/asttest/lib/lua/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Jun 9 13:54:11 CDT 2010
Author: mnicholson
Date: Wed Jun 9 13:54:08 2010
New Revision: 381
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=381
Log:
Turn on verbose logging and debugging in the default asterisk.conf, also dump the full log in the event of a failure starting asterisk.
Modified:
asterisk/trunk/asttest/lib/lua/astlib.lua
Modified: asterisk/trunk/asttest/lib/lua/astlib.lua
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/asttest/lib/lua/astlib.lua?view=diff&rev=381&r1=380&r2=381
==============================================================================
--- asterisk/trunk/asttest/lib/lua/astlib.lua (original)
+++ asterisk/trunk/asttest/lib/lua/astlib.lua Wed Jun 9 13:54:08 2010
@@ -98,7 +98,10 @@
posix.sleep(1)
end
if not booted:find("fully booted") then
- error("error waiting for asterisk to fully boot: " .. booted)
+ print("error waiting for asterisk to fully boot: " .. booted)
+ print("\nfull log follows:\n")
+ self:dump_full_log()
+ error("error starting asterisk")
end
end
@@ -212,6 +215,8 @@
s = c:new_section("options")
s["documentation_language"] = "en_US"
s["sendfullybooted"]="yes"
+ s["verbose"] = 10
+ s["debug"] = 10
s = c:new_section("compat")
s["pbx_realtime"] = "1.6"
@@ -256,6 +261,16 @@
func(self)
end
end
+end
+
+function asterisk:dump_full_log()
+ local log, err = io.open(self:path("/var/log/asterisk/full"), "r")
+ if not log then
+ print("error opening '" .. self:path("/var/log/asterisk/full") .. "': " .. err)
+ end
+
+ print(log:read("*a"))
+ log:close()
end
config = {}
More information about the svn-commits
mailing list