]> git.treefish.org Git - backmeupscotty.git/blobdiff - backmeupscotty
added timestamp to info and error output
[backmeupscotty.git] / backmeupscotty
index ad2fa6582ec1303bef176c47eaab0335ee03da67..152cf86261a0bd3db7becdd8d15319a1349ee670 100644 (file)
@@ -8,12 +8,16 @@ BACKUP_RUNEVERYNTHDAY=1
 
 _UPPERME=$(echo $(basename $0) | tr '[:lower:]' '[:upper:]')
 
+function timestamp {
+    date +"[%y-%m-%d %H:%M:%S]"
+}
+
 function scottyinfo {
-    echo $_UPPERME: $@ 
+    echo $(timestamp) $_UPPERME: $@ 
 }
 
 function scottyerror {
-    echo $_UPPERME: $@ >&2 
+    echo $(timestamp) $_UPPERME: $@ >&2 
 }
 
 function ssh255 {