Skip to content

Commit 4f9a852

Browse files
committed
📝
1 parent c4a2b18 commit 4f9a852

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pretty_logger.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Script to display a log file with ERROR lines in red.
22
# It displays the latest 200 lines of the log file.
3+
# The log file has to exist.
34
# It assumes that the errors are logged as for example:
45
# 2025-03-25 15:10:15 ERROR 'int' object has no attribute 'split'
56
#
@@ -33,7 +34,7 @@ LOG_FILE="${1:-app.log}"
3334

3435
# Check if the log file exists
3536
if [ ! -f "$LOG_FILE" ]; then
36-
echo "ERROR: Log file '$LOG_FILE' does not exist."
37+
echo "\033[31mERROR: Log file '$LOG_FILE' does not exist.\033[0m"
3738
echo "Run '$(basename "$0") --help' for usage information."
3839
exit 1
3940
fi

0 commit comments

Comments
 (0)