Skip to content
Snippets Groups Projects
Commit 05a270f1 authored by jaden's avatar jaden
Browse files

add ms to logging

parent 214e01f7
No related branches found
No related tags found
No related merge requests found
...@@ -37,24 +37,28 @@ is_master() { ...@@ -37,24 +37,28 @@ is_master() {
} }
log_date() {
date +%T.%3N
}
# Functions for coloring echo commands # Functions for coloring echo commands
log_debug() { log_debug() {
echo -e "(`date +%T`) \033[1;32m${@}\033[0m" echo -e "$(log_date) \033[1;32m${@}\033[0m"
} }
log_info() { log_info() {
echo -e "(`date +%T`) \033[1;34m${@}\033[0m" echo -e "$(log_date) \033[1;34m${@}\033[0m"
} }
log_warn() { log_warn() {
echo -e "(`date +%T`) \033[1;35mWarning: ${@}\033[0m" >&2 echo -e "$(log_date) \033[1;35mWarning: ${@}\033[0m" >&2
} }
log_error() { log_error() {
echo -e "(`date +%T`) \033[1;31mError: ${@}\033[0m" >&2 echo -e "$(log_date) \033[1;31mError: ${@}\033[0m" >&2
} }
...@@ -249,7 +253,7 @@ dav_recursive_mkdir() { ...@@ -249,7 +253,7 @@ dav_recursive_mkdir() {
# make sure the current subpath folder is created # make sure the current subpath folder is created
# a 405 exit code is returned when the folder already exists # a 405 exit code is returned when the folder already exists
dav_mkdir "$DOCSERVER/$current_subpath" 405 dav_mkdir "$current_subpath" 405
log_info "Directory ${current_subpath} (now) exists." log_info "Directory ${current_subpath} (now) exists."
done done
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment