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

* filter out POST /api/graphql spam from sndev logs

* don't use -P in grep
This commit is contained in:
Riccardo Balbo 2024-12-31 01:49:54 +01:00 committed by GitHub
parent bec27a5a0e
commit 1972af1fd9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

6
sndev
View File

@ -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"
@ -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