mirror of
https://github.com/overleaf/toolkit.git
synced 2025-04-19 23:38:06 +02:00
Add help to error-logs command
This commit is contained in:
parent
f42a52d36d
commit
61abb59cec
1 changed files with 28 additions and 0 deletions
|
@ -2,7 +2,35 @@
|
|||
|
||||
set -euo pipefail
|
||||
|
||||
function usage() {
|
||||
echo "Usage: bin/error-logs [OPTIONS] [SERVICES...]"
|
||||
echo ""
|
||||
echo "Services: chat, clsi, contacts, docstore, document-updater,"
|
||||
echo " filestore, notifications, real-time, spelling,"
|
||||
echo " tags, track-changes, web"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " -f follow log output"
|
||||
echo " -n {number} number of lines to print (default 20)"
|
||||
echo ""
|
||||
echo "Examples:"
|
||||
echo ""
|
||||
echo " bin/error-logs -n 50 web clsi"
|
||||
echo ""
|
||||
echo " bin/error-logs -f web"
|
||||
echo ""
|
||||
echo " bin/error-logs -f web chat docstore"
|
||||
echo ""
|
||||
echo " bin/error-logs -n 100 -f filestore "
|
||||
echo ""
|
||||
echo " bin/error-logs -f"
|
||||
}
|
||||
|
||||
function __main__() {
|
||||
if [[ "${1:-null}" == "help" ]] || [[ "${1:-null}" == "--help" ]]; then
|
||||
usage
|
||||
exit
|
||||
fi
|
||||
# preserve the '==>' labels from tail output
|
||||
bin/logs "$@" | grep -E '(^==>.*$|^.*level":50.*$)' --color=never
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue