Skip to content

Commit 7a0ce4f

Browse files
committed
feat: make error messages red in the terminal
Should help with isolating error messages in logs
1 parent 1c216ba commit 7a0ce4f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

functions/logging.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,13 @@ LOG_MESSAGE
1919
errors() {
2020
message=$1
2121
current_time=$(date +'%-d-%m ~ %T')
22+
RED=''
23+
NO_COLOUR=''
2224

2325
cat 1>&2 << ERROR_MESSAGE
26+
${RED}
2427
[ERROR: ${current_time}]
2528
${message}
26-
29+
${NO_COLOUR}
2730
ERROR_MESSAGE
2831
}

0 commit comments

Comments
 (0)