File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 10
10
#include < boost/iostreams/filter/zlib.hpp>
11
11
#include < boost/iostreams/filtering_stream.hpp>
12
12
#include < boost/program_options.hpp>
13
+ #include < chrono>
13
14
#include < cstdlib>
14
15
#include < functional>
15
16
#include < iostream>
@@ -769,7 +770,8 @@ struct session : enable_shared_from_this<session> {
769
770
770
771
if (stop_before && result.this_block ->block_num >= stop_before) {
771
772
close_streams ();
772
- cerr << " block " << result.this_block ->block_num << " : stop requested\n " ;
773
+ auto n = std::chrono::system_clock::to_time_t (std::chrono::system_clock::now ());
774
+ cerr << std::put_time (std::localtime (&n), " %F %T: " ) << " block " << result.this_block ->block_num << " : stop requested\n " ;
773
775
return false ;
774
776
}
775
777
@@ -781,8 +783,10 @@ struct session : enable_shared_from_this<session> {
781
783
782
784
if (!bulk || !(result.this_block ->block_num % 200 ))
783
785
close_streams ();
784
- if (!bulk)
785
- cerr << " block " << result.this_block ->block_num << " \n " ;
786
+ if (!bulk) {
787
+ auto n = std::chrono::system_clock::to_time_t (std::chrono::system_clock::now ());
788
+ cerr << std::put_time (std::localtime (&n), " %F %T: " ) << " block " << result.this_block ->block_num << " \n " ;
789
+ }
786
790
787
791
pqxx::work t (sql_connection);
788
792
pqxx::pipeline pipeline (t);
@@ -833,7 +837,8 @@ struct session : enable_shared_from_this<session> {
833
837
pipeline.complete ();
834
838
t.commit ();
835
839
836
- cerr << " block " << first_bulk << " - " << head << " \n " ;
840
+ auto n = std::chrono::system_clock::to_time_t (std::chrono::system_clock::now ());
841
+ cerr << std::put_time (std::localtime (&n), " %F %T: " ) << " block " << first_bulk << " - " << head << " \n " ;
837
842
first_bulk = 0 ;
838
843
}
839
844
You can’t perform that action at this time.
0 commit comments