-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlogger
47 lines (37 loc) · 831 Bytes
/
logger
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
function log() {
echo -e "`date`\t$@"
}
# Set Colors
bold=$(tput bold)
underline=$(tput sgr 0 1)
reset=$(tput sgr0)
purple=$(tput setaf 171)
red=$(tput setaf 1)
green=$(tput setaf 76)
tan=$(tput setaf 3)
blue=$(tput setaf 38)
# Headers and Logging
function print_header() {
printf "\n${bold}${purple}========== %s ==========${reset}\n" "$@"
}
function arrow() {
printf "➜ $@\n"
}
function success() {
printf "${green}✔ %s${reset}\n" "$@"
}
function error() {
printf "${red}✖ %s${reset}\n" "$@"
}
function warning() {
printf "${tan}➜ %s${reset}\n" "$@"
}
function underline() {
printf "${underline}${bold}%s${reset}\n" "$@"
}
function bold() {
printf "${bold}%s${reset}\n" "$@"
}
function note() {
printf "${underline}${bold}${blue}Note:${reset} ${blue}%s${reset}\n" "$@"
}