Skip to content

Commit

Permalink
Merge pull request #739 from AntelopeIO/GH-724-dmlog-flush-main
Browse files Browse the repository at this point in the history
[1.0.1 -> main] Flush deep-mind logger after each message
  • Loading branch information
heifner authored Sep 10, 2024
2 parents 69c3d63 + b059c80 commit 849a6bf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libraries/libfc/src/log/dmlog_appender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
#include <boost/thread/mutex.hpp>
#include <fc/exception/exception.hpp>
#include <iomanip>
#include <mutex>
#include <sstream>
#include <cstdio>

namespace fc {
class dmlog_appender::impl {
Expand Down Expand Up @@ -93,5 +92,8 @@ namespace fc {
message_ptr = &message_ptr[written];
remaining_size -= written;
}
// attempt a flush, ignore any error
if (!my->is_stopped)
fflush(my->out);
}
}

0 comments on commit 849a6bf

Please sign in to comment.