Open adibsaad opened 3 years ago
Hey Adib!
echo
is only meant for streaming the daemonized process output to stdout. It doesn't have history and stuff. connect
is more suitable for viewing the logs.
Hy Adib and Darth!
Quick question on how to subscribe to the overmind logs
(came here while searching for a overmind logs
command)
I'm restarting a process inside a docker container with overmind restart
and I want to show the stdout
of this process until I read a certain line.
Is there a way to subscribe to it via overmind
?
Thanks
Ps:
connect
but it just shows the terminals.strace
on the /proc/1/fd/1
(stdout descriptor) but I can't get this feature on the containertmux
afficionados and all I see in the doc go over pane
and terminal (tty)
. It seems that you can watch
them but I have no idea how it works.Any pointer welcome. Have a nice day Nico
Hey @gerardnico! Unfortunately, Overmind doesn't have such a feature.
There's an ugly workaround (replace process_name
with the actual process name):
overmind echo | grep --line-buffered -E '^([[:cntrl:]]\[\d+(;\d+)*m)?process_name\s*([[:cntrl:]]\[0m)? \| ' | sed 's/^.*\| //'
grep
selects only the lines for the required process. All that ugly stuff around the process name is to match the coloring.
sed
removes the process name from the lines.
Thanks @DarthSim Daemon mode then.
You still capture the stdout of the terminals because I get them in the docker logs with different colour. How do you do that. This is a feature of tmux?
Actually in other setups, I get the logs file of running process and redirect them to '/dev/fd/1' so that they show up in the docker logs command.
Thanks ! Pretty impressive. I'm a dummy with tty and overmind feels magical.
Add an option to specify which process to view logs for e.g.
Also, would be nice to have
logs
be an alias forecho
.