Skip to content

Commit

Permalink
bcc-lua: switch to quiet by default
Browse files Browse the repository at this point in the history
use --verbose to turn verbose output

Signed-off-by: Alexei Starovoitov <[email protected]>
  • Loading branch information
4ast committed Apr 9, 2016
1 parent b6e0a54 commit fca28a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/lua/bcc/run.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ return function()

local function print_usage()
io.stderr:write(string.format(
"usage: %s [[--so-path=PATH|--version|--quiet] --] path_to_script.lua [...]\n",
"usage: %s [[--so-path=PATH|--version|--verbose] --] path_to_script.lua [...]\n",
progname))
os.exit(1)
end
Expand All @@ -41,8 +41,8 @@ return function()
rawset(_G, "LIBBCC_SO_PATH", string.lstrip(k, "--so-path="))
elseif k == "--llvm-debug" then
rawset(_G, "LIBBCC_LLVM_DEBUG", 1)
elseif k == "-q" or k == "--quiet" then
log.enabled = false
elseif k == "-V" or k == "--verbose" then
log.enabled = true
elseif k == "-v" or k == "--version" then
print_version()
else
Expand Down
2 changes: 1 addition & 1 deletion src/lua/bcc/vendor/helpers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -169,5 +169,5 @@ setmetatable(_G, {
end,
})

rawset(_G, "log", { info = logline, enabled = true })
rawset(_G, "log", { info = logline, enabled = false })
rawset(_G, "class", require("bcc.vendor.middleclass"))

0 comments on commit fca28a5

Please sign in to comment.