Skip to content

Commit

Permalink
Merge pull request #462 from x5ud0kn1gh7x/main
Browse files Browse the repository at this point in the history
Logging Improvement
  • Loading branch information
six2dez committed Feb 3, 2022
2 parents 767c894 + 909b8ed commit 2b68385
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions reconftw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1807,7 +1807,7 @@ function sendToNotify {
function start_func(){
printf "${bgreen}#######################################################################"
notification "${2}" info
echo "Start function ${1} $(date +"%F") $(date +"%T")" >> ${LOGFILE}
echo "[ $(date +"%F %T") ] Start function : ${1} " >> ${LOGFILE}
start=$(date +%s)
}

Expand All @@ -1816,14 +1816,14 @@ function end_func(){
end=$(date +%s)
getElapsedTime $start $end
notification "${2} Finished in ${runtime}" info
echo "End function ${2} $(date +"%F") $(date +"%T")" >> ${LOGFILE}
echo "[ $(date +"%F %T") ] End function : ${2} " >> ${LOGFILE}
printf "${bblue} ${1} ${reset}\n"
printf "${bgreen}#######################################################################${reset}\n"
}

function start_subfunc(){
notification "${2}" warn
echo "Start subfunction ${1} $(date +"%F") $(date +"%T")" >> ${LOGFILE}
echo "[ $(date +"%F %T") ] Start subfunction : ${1} " >> ${LOGFILE}
start_sub=$(date +%s)
}

Expand All @@ -1832,7 +1832,7 @@ function end_subfunc(){
end_sub=$(date +%s)
getElapsedTime $start_sub $end_sub
notification "${1} in ${runtime}" good
echo "End subfunction ${1} $(date +"%F") $(date +"%T")" >> ${LOGFILE}
echo "[ $(date +"%F %T") ] End subfunction : ${1} " >> ${LOGFILE}
}

function resolvers_update(){
Expand Down

0 comments on commit 2b68385

Please sign in to comment.