Skip to content

Commit

Permalink
Merge pull request #36 from lucastx/timestamp-logs
Browse files Browse the repository at this point in the history
timestamps each log entry
  • Loading branch information
ku1ik committed Jan 14, 2013
2 parents c0eb396 + eaa80cc commit 9622eac
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion bin/bitpocket
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,14 @@ function on_slow_sync_stop {
}

function cron {
DISPLAY=:0.0 sync 2>&1 >>"$DOT_DIR/log"
DISPLAY=:0.0 sync 2>&1 | timestamp >>"$DOT_DIR/log"
}

function timestamp {
while read data
do
echo "[$(date +"%D %T")] $data"
done
}

function acquire_lock {
Expand Down

0 comments on commit 9622eac

Please sign in to comment.