diff options
author | sanine <sanine.not@pm.me> | 2022-01-04 12:40:29 -0600 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2022-01-04 12:40:29 -0600 |
commit | a026db7389c15eb5a8905e6f04eb3a92bf31f9bc (patch) | |
tree | b8d0ff6049db05acb8068ce1cc0e1dcd40fc0797 /src/lua-script/script.h | |
parent | 0e84036b1b727356d433373b017204a8d575d2e4 (diff) |
improve logging and move per-function logs to TRACE
Diffstat (limited to 'src/lua-script/script.h')
-rw-r--r-- | src/lua-script/script.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lua-script/script.h b/src/lua-script/script.h index fe92cef..6bd07bb 100644 --- a/src/lua-script/script.h +++ b/src/lua-script/script.h @@ -1,5 +1,6 @@ const char *argent_script = "return function(config)\n" + " local fmt = string.format\n" "\n" " --------------------------------\n" " --\n" @@ -48,8 +49,7 @@ const char *argent_script = "\n" " function setup(config)\n" " argent.log('debug', 'begin setup')\n" - " local fmt = string.format\n" - "\n" + " \n" " argent.config = {\n" " site_directory = add_end_slash(config.site_directory) or 'site/',\n" " output_directory = add_end_slash(config.output_directory) or 'public/',\n" @@ -116,9 +116,11 @@ const char *argent_script = "\n" " function obliterate_file(file, parent)\n" " if argent.config.keep[file] then\n" + " argent.log('debug', fmt('retaining file %q', file))\n" " return true\n" " end\n" "\n" + " argent.log('debug', fmt('removing file %q', file))\n" " os.remove(argent.config.output_directory..parent..file)\n" " return false\n" " end\n" @@ -126,9 +128,11 @@ const char *argent_script = "\n" " function obliterate_dir(dir, parent)\n" " if argent.config.keep[strip_end_slash(dir)] then\n" + " argent.log('debug', fmt('retaining directory %q', dir))\n" " return true\n" " end\n" "\n" + " argent.log('debug', fmt('obliterating files in %q', parent..dir))\n" " return obliterate_directory(dir, parent)\n" " end\n" "\n" |