DarthSim / overmind

Process manager for Procfile-based applications and tmux
MIT License
2.82k stars 79 forks source link

Timestamps on output #100

Closed zofrex closed 1 year ago

zofrex commented 3 years ago

I'm trying out Overmind instead of Foreman and there's one feature I'm missing, which is the timestamps.

In Foreman the output looks like:

15:48:36 web.1       | => Booting Puma
15:48:36 web.1       | => Rails 6.0.3.4 application starting in development 

And in Overmind:

web       | => Booting Puma
web       | => Rails 6.0.3.4 application starting in development 

I do find timestamps useful sometimes, so it would be great to have an option to display some.

Apologies if this is already possible, or has already been discussed before, but I searched and couldn't find it.

swiknaba commented 3 years ago

Possibly, this would result in duplicate timestamps though, since e.g. Sidekiq already prints out timestamps:

sidekiq_default | 2020-12-31T11:58:24.864Z pid=54814 tid=a2e INFO: Booted Rails 6.0.3.4 application in development environment
sidekiq_default | 2020-12-31T11:58:24.864Z pid=54814 tid=a2e INFO: Running in ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-darwin19]
sidekiq_default | 2020-12-31T11:58:24.864Z pid=54814 tid=a2e INFO: See LICENSE and the LGPL-3.0 for licensing details.

single requests also come with a timestamp in puma:

web     | Started GET "/" for 127.0.0.1 at 2020-12-31 13:04:54 +0100

Ideally, timestamps would be configurable (on/off) and only show the time (without date; the date doesn't change that often during my workday) to keep the log less verbose.

DarthSim commented 3 years ago

Most of the tools write their own timestamps to the log. If they don't, it's probably no much sense in timestamps in the context of the tool. However, I have this feature in mind.

ganjash commented 3 years ago

ya I agree, It's best to keep it optional, enabling on passing a parameter.

DarthSim commented 1 year ago

--show-timestamps (OVERMIND_SHOW_TIMESTAMPS) flag is added to v2.4.0