client: Clean up logging

This commit is contained in:
Perttu Ahola 2014-09-28 00:44:45 +03:00
parent 880406b193
commit c54cda99ff
3 changed files with 5 additions and 5 deletions

View File

@ -4,7 +4,7 @@
local log = buildat.Logger("__client/extensions")
function __buildat_load_extension(name)
log:info("__buildat_load_extension(\""..name.."\")")
log:debug("__buildat_load_extension(\""..name.."\")")
local path = __buildat_extension_path(name).."/init.lua"
local script, err = loadfile(path)
if script == nil then
@ -20,7 +20,7 @@ function __buildat_load_extension(name)
end
table.insert(package.loaders, 1, function(name)
log:info("package.loader called with name=\""..name.."\"")
log:debug("package.loader called with name=\""..name.."\"")
local m = string.match(name, '^buildat/extension/([a-zA-Z0-9_]+)$')
if m then
return function()

View File

@ -46,7 +46,7 @@ __buildat_sandbox_environment = {
--
__buildat_sandbox_environment.require = function(name)
log:info("require(\""..name.."\")")
log:debug("require(\""..name.."\")")
-- Check loaded modules
if package.loaded[name] then
local unsafe = package.loaded[name]
@ -66,7 +66,7 @@ __buildat_sandbox_environment.require = function(name)
if type(unsafe.safe) ~= 'table' then
error("require: \""..name.."\" didn't return safe interface")
end
log:info("Loaded extension \""..name.."\"")
log:verbose("Loaded extension \""..name.."\"")
return unsafe.safe
end
-- Disallow loading anything else

View File

@ -80,7 +80,7 @@ static int path_allowed(const char *path)
if(strstr(path + base_len, "..") != NULL)
continue;
// Path is ok
fprintf(stderr, "### guard: Path %s allowed within base %s\n", path, base);
//fprintf(stderr, "### guard: Path %s allowed within base %s\n", path, base);
return 1;
}
fprintf(stderr, "### guard: Path not allowed: %s\n", path);