Skip to content

Commit

Permalink
filter out POST /api/graphql spam from sndev logs (#1780)
Browse files Browse the repository at this point in the history
* filter out POST /api/graphql spam from sndev logs

* don't use -P in grep
  • Loading branch information
riccardobl authored Dec 31, 2024
1 parent bec27a5 commit 1972af1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sndev
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ if [ -f .env.local ]; then
. ./.env.local
fi

logFilter() {
grep -v --line-buffered --color=never 'POST /api/graphql .*200'
}

docker__compose() {
if [ ! -x "$(command -v docker)" ]; then
echo "docker compose is not installed"
Expand Down Expand Up @@ -128,7 +132,7 @@ OPTIONS"
sndev__logs() {
shift
if [ $# -eq 1 ]; then
docker__compose logs -t --tail=1000 -f "$@"
docker__compose logs -t --tail=1000 -f "$@" | logFilter
exit 0
fi

Expand Down

0 comments on commit 1972af1

Please sign in to comment.