aboutsummaryrefslogtreecommitdiffstats
path: root/alv/copilot.moon
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2020-04-24 09:26:29 +0000
committers-ol <s-ol@users.noreply.github.com>2020-04-24 10:38:23 +0000
commitf189c84d1174713c36d3f2c1d172e1ad76776b47 (patch)
tree4fd1b961ea9a9559563b3f088a6154e2240f69b2 /alv/copilot.moon
parentlib/string: fix str/.. (diff)
downloadalive-f189c84d1174713c36d3f2c1d172e1ad76776b47.tar.gz
alive-f189c84d1174713c36d3f2c1d172e1ad76776b47.zip
better logging interface
Diffstat (limited to 'alv/copilot.moon')
-rw-r--r--alv/copilot.moon5
1 files changed, 2 insertions, 3 deletions
diff --git a/alv/copilot.moon b/alv/copilot.moon
index e5868bb..9d573c0 100644
--- a/alv/copilot.moon
+++ b/alv/copilot.moon
@@ -22,7 +22,6 @@ class Copilot
-- @tparam string file name/path of the alive file to watch and execute
new: (file) =>
@registry = Registry!
- @eval_stream, @run_stream = io.stderr, io.stdout
@open file if file
open: (file) =>
@@ -43,6 +42,7 @@ class Copilot
@poll!
if @root
+ L\set_time 'run'
@registry\begin_tick!
ok, error = Error.try "updating", ->
@root\tick_io!
@@ -69,10 +69,9 @@ class Copilot
return
if @last_modification < modification
- L.stream = @eval_stream
+ L\set_time 'eval'
L\log "#{@file} changed at #{modification}"
@eval!
- L.stream = @run_stream
@last_modification = os.time!
{