]> git.treefish.org Git - backmeupscotty.git/commitdiff
added timestamp to info and error output
authorAlexander Schmidt <alex@treefish.org>
Mon, 20 Jul 2015 21:54:21 +0000 (23:54 +0200)
committerAlexander Schmidt <alex@treefish.org>
Mon, 20 Jul 2015 21:54:21 +0000 (23:54 +0200)
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 {