Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support grepping output from commands as well as files #281

Open
unikitty37 opened this issue Aug 23, 2023 · 0 comments
Open

Support grepping output from commands as well as files #281

unikitty37 opened this issue Aug 23, 2023 · 0 comments

Comments

@unikitty37
Copy link

Is your feature request related to a problem? Please describe.
I'm using docker compose to run multiple containers. The container I need to grep — a Rails server — doesn't log to a file (where docker compose logs can't see it) but to STDOUT. This is the correct way to work with Docker, but it doesn't work with GrepConsole, which wants a path to a file.

Describe the solution you'd like
I'd like GrepConsole to support piping input from user-supplied commands, so I can grep the output of docker compose logs -f rails.

Describe alternatives you've considered
The only solution I can find for this particular case is to configure Rails to log to its normal log/development.log rather than to STDOUT. This then means that nothing that works with Docker logs will be able to interact with the Rails log.

It also doesn't solve the problem for non-Rails containers that don't expose their log files to the host — I wouldn't be able to grep the Postgres logs without finding where they're stored in the Postgres container and adding a mount point to the docker-compose config (which I would then have to keep as a local change and never commit to the repo — all these hacks add up fast and make development a chore…)

Additional context
n/a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant