diff options
Diffstat (limited to 'ot_stats.c')
-rw-r--r-- | ot_stats.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -642,9 +642,17 @@ void stats_issue_event( ot_status_event event, PROTO_FLAG proto, uintptr_t event | |||
642 | case EVENT_COMPLETED: | 642 | case EVENT_COMPLETED: |
643 | #ifdef WANT_SYSLOGS | 643 | #ifdef WANT_SYSLOGS |
644 | if( event_data) { | 644 | if( event_data) { |
645 | char timestring[64]; | ||
645 | char hex_out[42]; | 646 | char hex_out[42]; |
647 | struct tm time_now; | ||
648 | time_t ttt; | ||
649 | |||
650 | time( &ttt ); | ||
651 | localtime_r( &ttt, &time_now ); | ||
652 | strftime( timestring, sizeof( timestring ), "%FT%T%z", &time_now ); | ||
653 | |||
646 | to_hex( hex_out, (uint8_t*)event_data ); | 654 | to_hex( hex_out, (uint8_t*)event_data ); |
647 | syslog( LOG_INFO, "event=completed info_hash=%s", hex_out ); | 655 | syslog( LOG_INFO, "time=%s event=completed info_hash=%s", timestring, hex_out ); |
648 | } | 656 | } |
649 | #endif | 657 | #endif |
650 | ot_overall_completed++; | 658 | ot_overall_completed++; |