We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c4a2b18 commit 4f9a852Copy full SHA for 4f9a852
1 file changed
pretty_logger.sh
@@ -1,5 +1,6 @@
1
# Script to display a log file with ERROR lines in red.
2
# It displays the latest 200 lines of the log file.
3
+# The log file has to exist.
4
# It assumes that the errors are logged as for example:
5
# 2025-03-25 15:10:15 ERROR 'int' object has no attribute 'split'
6
#
@@ -33,7 +34,7 @@ LOG_FILE="${1:-app.log}"
33
34
35
# Check if the log file exists
36
if [ ! -f "$LOG_FILE" ]; then
- echo "ERROR: Log file '$LOG_FILE' does not exist."
37
+ echo "\033[31mERROR: Log file '$LOG_FILE' does not exist.\033[0m"
38
echo "Run '$(basename "$0") --help' for usage information."
39
exit 1
40
fi
0 commit comments