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:
parent
bec27a5a0e
commit
1972af1fd9
6
sndev
6
sndev
|
@ -7,6 +7,10 @@ if [ -f .env.local ]; then
|
||||||
. ./.env.local
|
. ./.env.local
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
logFilter() {
|
||||||
|
grep -v --line-buffered --color=never 'POST /api/graphql .*200'
|
||||||
|
}
|
||||||
|
|
||||||
docker__compose() {
|
docker__compose() {
|
||||||
if [ ! -x "$(command -v docker)" ]; then
|
if [ ! -x "$(command -v docker)" ]; then
|
||||||
echo "docker compose is not installed"
|
echo "docker compose is not installed"
|
||||||
|
@ -128,7 +132,7 @@ OPTIONS"
|
||||||
sndev__logs() {
|
sndev__logs() {
|
||||||
shift
|
shift
|
||||||
if [ $# -eq 1 ]; then
|
if [ $# -eq 1 ]; then
|
||||||
docker__compose logs -t --tail=1000 -f "$@"
|
docker__compose logs -t --tail=1000 -f "$@" | logFilter
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue