summaryrefslogtreecommitdiff
path: root/cal.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2018-09-08 18:38:09 +0200
committerPhilipp Gesang <phg@phi-gamma.net>2018-09-08 18:38:15 +0200
commit318e8a990ebe94c48f69d3bb1d342a31cf55f1db (patch)
treebd0796fc12ebe6dcc7d6c1a3a5df5eaedb8fdb27 /cal.lua
parent35aaedc729970ae2c5aa26738babd6c9939e338c (diff)
downloadcaldr-318e8a990ebe94c48f69d3bb1d342a31cf55f1db.tar.gz
common, cal: rework debug printers
* prefix messages to indicate the debug level * colorize when printing to terminal This introduces a dependency on luaposix.
Diffstat (limited to 'cal.lua')
-rw-r--r--cal.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/cal.lua b/cal.lua
index 3a5c509..0cd97b5 100644
--- a/cal.lua
+++ b/cal.lua
@@ -224,7 +224,7 @@ local parse_calendar_lines do
--]]--
local add_param = function (t, k, v)
- debugln ("»»»» add_param ({%s}, %s, %s)", t, tostring (k), tostring (v))
+ debugln ("add_param ({%s}, %s, %s)", t, tostring (k), tostring (v))
t [#t + 1] = { name = k, value = v }
@@ -279,7 +279,7 @@ local parse_calendar_lines do
if ok == false then
pos1 = skip_line (raw, pos0)
if pos0 == pos1 then
- noiseln ("»»» [%d] reached EOF, terminating after %d bytes, \z
+ noiseln ("[%d] reached EOF, terminating after %d bytes, \z
%d calendar lines",
pos0, consumed, nline)
return acc
@@ -287,7 +287,7 @@ local parse_calendar_lines do
errorln ("[%d–%d] %d bad content line; skipping", pos0, pos1, nline)
nskipped = nskipped + 1
else
- noiseln ("»»» [%d–%d] “%s” [%s] “%s”",
+ noiseln ("[%d–%d] “%s” [%s] “%s”",
pos0, pos1, name, fmt_calendar_params (params), value)
acc [#acc + 1] = { pos = { pos0, pos1 }
, name = name, params = params, value = value }