-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogger.sh
More file actions
executable file
·34 lines (27 loc) · 761 Bytes
/
Copy pathlogger.sh
File metadata and controls
executable file
·34 lines (27 loc) · 761 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
######################### COLORS ##############################################
COLOR_BLACK='\e[0;30m'
COLOR_RED='\e[0;31m'
COLOR_GREEN='\e[0;32m'
COLOR_YELLOW='\e[0;33m'
COLOR_BLUE='\e[0;34m'
COLOR_PURPLE='\e[0;35m'
COLOR_CYAN='\e[0;36m'
COLOR_WHITE='\e[0;37m'
COLOR_RESET='\e[0m'
######################### LOGGING #############################################
ERROR()
{
echo -e "${COLOR_RED}[$(date --rfc-3339=seconds)][$(caller)]$*${COLOR_RESET}"
}
DEBUG()
{
echo -e "${COLOR_GREEN}[$(date --rfc-3339=seconds)][$(caller)]$*${COLOR_RESET}"
}
NOTIFY()
{
echo -e "${COLOR_YELLOW}[$(date --rfc-3339=seconds)][$(caller)]$*${COLOR_RESET}"
}
ERROR "This is ERROR message"
DEBUG "This is DEBUG message"
NOTIFY "This is NOTIFY message"