diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2023-11-07 17:53:03 +0100 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2023-11-07 17:53:03 +0100 |
commit | eb0a541d5d250d6d6559be509c71e12f39230a01 (patch) | |
tree | 33511e20bb07154c4f0efe18d8cbdcbabe3eb44e | |
parent | 89e27b5e7acfa274099feb2cd6dd6da010ade33a (diff) | |
download | vis-par-eb0a541d5d250d6d6559be509c71e12f39230a01.tar.gz |
Make logging configuarble.
-rw-r--r-- | init.lua | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -5,12 +5,15 @@ local M = {} M.par_prg = "par" M.par_tw = 72 M.ex_args = function () return "RET4bhgqw" .. M.par_tw end +M.debug = false -- ex_args = "RET4bhgqB=.,?_A_aQ=_s>|w" .. par_tw -- export PARINIT='Tbp2hgqR B=.,?_A_a Q=_s>|' function print(...) - _print_ = _print_ or io.open("/tmp/visprint", "w") - _print_:write(..., "\n") + if M.debug then + _print_ = _print_ or io.open("/tmp/visprint", "w") + _print_:write(..., "\n") + end end --- Dump value of a variable in a formatted string |