From 6306a46b840f2727c839ed4c783baa0142e68272 Mon Sep 17 00:00:00 2001 From: ALIHAN DIKEL Date: Sun, 27 Oct 2024 23:55:42 +0300 Subject: [PATCH] autocommit --- scripts/monitor_server.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/monitor_server.sh b/scripts/monitor_server.sh index 09333aa..fc7c913 100755 --- a/scripts/monitor_server.sh +++ b/scripts/monitor_server.sh @@ -1,8 +1,10 @@ #!/bin/bash -echo "conencting to 219 and retrieving supervisor log output:" +echo -e "\033[94m[INFO]\033[0m conencting to 219 and retrieving supervisor log output:" ssh uad@192.168.1.219 "tail -f /home/uad/tello-commander/src/server/supervisor/tello-server.out.log" | \ awk ' -/WARNING/ {print "\033[1;33m" $0 "\033[0m"} -/ERROR|CRIT/ {print "\033[1;31m" $0 "\033[0m"} +/WARNING/ {gsub(/WARNING/, "\033[33m&\033[0m"); print} # Yellow for WARNING +/ERROR|CRIT/ {gsub(/(ERROR|CRIT)/, "\033[31m&\033[0m"); print} # Red for ERROR/CRIT +/INFO/ {gsub(/INFO/, "\033[37m&\033[0m"); print} # White for INFO +/DEBUG/ {gsub(/DEBUG/, "\033[34m&\033[0m"); print} # Blue for DEBUG ' \ No newline at end of file