diff --git a/apps/log_monitor/src/watcher.erl b/apps/log_monitor/src/watcher.erl index f80ed90..8496373 100644 --- a/apps/log_monitor/src/watcher.erl +++ b/apps/log_monitor/src/watcher.erl @@ -6,6 +6,7 @@ start_link(SupPid, File) -> gen_server:start_link(?MODULE, [SupPid, File], []). init([SupPid, File]) -> + timer:sleep(1000), Cmd = "/usr/bin/tail -n0 --follow=name " ++ File, Port = open_port({spawn, Cmd}, [stderr_to_stdout, exit_status, binary]), {ok, [SupPid, Port]}.