My process is:
tat (short for “tmux attach”) to attach to the project’s tmux session only for long-running processes
./bin/setup && foreman start to set up the app and get the server going
- exist the session to do my normal Git/Vim work.
- when I need to see the logs,
- open a second tmux window
tail -f log/development.log
- I generally just leave that running until the next time my machine restarts, so if I need to return to the logs, they’re a quick
That has been the right mix for me of information hiding when I don’t need something, and granularity in the 1% case when I need it.
It sounds like
foreman start is too quiet and
tail -f log/development.log is too noisy for your tastes. I think my advice is to start with
tail -f log/development.log and then use Unix pipes and commands to start to filter the results to just what you’re looking for, perhaps building up some sweet aliases over time (which I’d love to see shared back here!).
alias tail-log="tail -f log/development.log
tail-log | ag 'SELECT':
User Load (1.2ms) SELECT "users".* FROM "users" WHERE "users"."remember_token" IS NULL ORDER BY "users"."id" ASC LIMIT 1
CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."remember_token" IS NULL ORDER BY "users"."id" ASC LIMIT 1