mirror of
https://github.com/XRPLF/clio.git
synced 2026-04-29 15:37:53 +00:00
25 lines
365 B
C++
25 lines
365 B
C++
#pragma once
|
|
#include "util/StringBuffer.hpp"
|
|
|
|
#include <ostream>
|
|
#include <string>
|
|
|
|
class LoggerBuffer {
|
|
public:
|
|
std::string
|
|
getStrAndReset()
|
|
{
|
|
return buffer_.getStrAndReset();
|
|
}
|
|
|
|
std::ostream&
|
|
getStream()
|
|
{
|
|
return stream_;
|
|
}
|
|
|
|
private:
|
|
StringBuffer buffer_;
|
|
std::ostream stream_ = std::ostream{&buffer_};
|
|
};
|