Skip to content

Commit

Permalink
Merge pull request #110 from NUAA-Open-Source/dev
Browse files Browse the repository at this point in the history
add: script for searching docker logs in prod env
  • Loading branch information
arcosx authored Jul 5, 2020
2 parents 2c1e025 + 576f6d9 commit 1df8ff0
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 1df8ff0

Please sign in to comment.