Improve MemoryLog.

GitOrigin-RevId: 8ba9661f6b673ca0082f7bd4d75b2046faed93fe
This commit is contained in:
levlam 2020-08-04 01:19:45 +03:00
parent 4cbc6035e7
commit 37e87bddf5

View File

@ -19,6 +19,7 @@ namespace td {
template <int buffer_size = 32 * (1 << 10)>
class MemoryLog : public LogInterface {
static constexpr size_t MAX_OUTPUT_SIZE = buffer_size / 16 < (8 << 10) ? buffer_size / 16 : (8 << 10);
static_assert((buffer_size & 15) == 0 && buffer_size >= (8 << 10), "Invalid buffer size");
public:
MemoryLog() {