Skip to content

Instantly share code, notes, and snippets.

@detj
Last active October 23, 2024 23:26
Show Gist options
  • Save detj/88a615e658227348392277477f0bd81d to your computer and use it in GitHub Desktop.
Save detj/88a615e658227348392277477f0bd81d to your computer and use it in GitHub Desktop.
use angle grinder to filter certain log lines
# syntax - assuming a `docker-compose.yml` file is present at $(PWD)
docker compose logs --no-log-prefix -f <compose-service-name> | agrind '(*) AND NOT ("string-one" OR "string-two")'
# example
docker compose logs --no-log-prefix -f my-compose-service | agrind '(*) AND NOT ("ping" OR "traces export")'
# combine angle grinder with tailspin
docker compose logs --no-log-prefix -f my-compose-service | agrind '(*) AND NOT ("ping" OR "traces export")' | tspin -ce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment