add verbosef

This commit is contained in:
tdijck 2015-03-25 09:39:47 -07:00 committed by Tom van Dijck
parent 878d108367
commit 4d514e53f8
2 changed files with 15 additions and 0 deletions

View File

@ -1053,6 +1053,12 @@
description = "Display this information"
}
newoption
{
trigger = "verbose",
description = "Generate extra debug text output"
}
newoption
{
trigger = "interactive",

View File

@ -211,3 +211,12 @@
function printf(msg, ...)
print(string.format(msg, unpack(arg)))
end
--
-- A shortcut for printing formatted output in verbose mode.
--
function verbosef(msg, ...)
if _OPTIONS.verbose then
print(string.format(msg, ...))
end
end