add verbosef
This commit is contained in:
parent
878d108367
commit
4d514e53f8
@ -1053,6 +1053,12 @@
|
||||
description = "Display this information"
|
||||
}
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "verbose",
|
||||
description = "Generate extra debug text output"
|
||||
}
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "interactive",
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user