Skip to content

Commit

Permalink
add: script for searching docker logs in prod env
Browse files Browse the repository at this point in the history
  • Loading branch information
Triple-Z committed Jul 5, 2020
1 parent 2c1e025 commit 576f6d9
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions scripts/search-prod-logs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
# Author: TripleZ<[email protected]>

echo -e "
This script is for searching the safeu-backend application log with
your specific keyword.
Usage:
./search-prod-logs.sh [OPTIONS] Search logs
Example:
./search-prod-logs.sh --tail 1000 Show the last 1000 lines of log
"

echo -e "\n Input your query keyword: \c"
read kw
echo ""

sudo docker-compose -f ../deployments/prod-safeu/docker-compose.yml logs -t "$@" | grep "$kw" | more

echo -e "\n Bye~"

0 comments on commit 576f6d9

Please sign in to comment.