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

filter out POST /api/graphql spam from sndev logs #1780

Merged
merged 2 commits into from
Dec 31, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 -P 'POST /api/graphql \x1b\[32m200\x1b\[39m in [0-9]+ms'
}

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
Loading