File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -153,10 +153,12 @@ class Logs
153
153
154
154
// Batching members
155
155
mutable std::mutex batchMutex_;
156
+ public:
156
157
static constexpr size_t BATCH_BUFFER_SIZE = 64 * 1024 ; // 64KB buffer
157
158
std::array<char , BATCH_BUFFER_SIZE> batchBuffer_{};
158
- static thread_local std::span<char > writeBuffer_; // Points to available write space
159
+ std::span<char > writeBuffer_; // Points to available write space
159
160
std::span<char > readBuffer_; // Points to data ready to flush
161
+ private:
160
162
std::chrono::steady_clock::time_point lastFlush_ =
161
163
std::chrono::steady_clock::now ();
162
164
Original file line number Diff line number Diff line change 37
37
#include < vector>
38
38
39
39
namespace ripple {
40
- thread_local std::span<char > Logs::writeBuffer_{};
41
40
42
41
namespace {
43
42
constexpr auto FLUSH_INTERVAL =
@@ -130,8 +129,8 @@ Logs::File::write(std::string_view text)
130
129
131
130
Logs::Logs (beast::severities::Severity thresh)
132
131
: thresh_(thresh) // default severity
133
- // , writeBuffer_(
134
- // batchBuffer_) // Initially, entire buffer is available for writing
132
+ , writeBuffer_(
133
+ batchBuffer_) // Initially, entire buffer is available for writing
135
134
, readBuffer_(batchBuffer_.data(), 0 ) // No data ready to flush initially
136
135
{
137
136
}
You can’t perform that action at this time.
0 commit comments