From 66cda4bc7559ef0930b8dd0d36ac64c274defbd6 Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Wed, 21 Apr 2010 13:23:40 +0000 Subject: Add our own time stamps to the completed logs. --- ot_stats.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'ot_stats.c') diff --git a/ot_stats.c b/ot_stats.c index 1f5e5e9..8ba6ade 100644 --- a/ot_stats.c +++ b/ot_stats.c @@ -642,9 +642,17 @@ void stats_issue_event( ot_status_event event, PROTO_FLAG proto, uintptr_t event case EVENT_COMPLETED: #ifdef WANT_SYSLOGS if( event_data) { + char timestring[64]; char hex_out[42]; + struct tm time_now; + time_t ttt; + + time( &ttt ); + localtime_r( &ttt, &time_now ); + strftime( timestring, sizeof( timestring ), "%FT%T%z", &time_now ); + to_hex( hex_out, (uint8_t*)event_data ); - syslog( LOG_INFO, "event=completed info_hash=%s", hex_out ); + syslog( LOG_INFO, "time=%s event=completed info_hash=%s", timestring, hex_out ); } #endif ot_overall_completed++; -- cgit v1.2.3