Sese Framework
2.3.0
A cross-platform framework
|
Block file log appender class. More...
#include <BlockAppender.h>
Public Member Functions | |
BlockAppender (size_t block_max_size, Level level=Level::DEBUG) | |
~BlockAppender () noexcept override | |
void | dump (const char *buffer, size_t size) noexcept override |
Public Member Functions inherited from sese::record::AbstractAppender | |
AbstractAppender () noexcept=default | |
virtual | ~AbstractAppender () noexcept=default |
AbstractAppender (Level level) noexcept | |
Level | getLevel () const noexcept |
void | setLevel (Level lv) noexcept |
Private Attributes | |
size_t | size = 0 |
std::mutex | mutex |
size_t | maxSize = 0 |
io::BufferedStream::Ptr | bufferedStream |
io::FileStream::Ptr | fileStream |
Additional Inherited Members | |
Public Types inherited from sese::record::AbstractAppender | |
typedef std::shared_ptr< AbstractAppender > | Ptr |
Protected Attributes inherited from sese::record::AbstractAppender | |
Level | level = Level::DEBUG |
Output threshold. | |
Block file log appender class.
|
explicit |
Initialize block parameters
block_max_size | Preset size of the block. This parameter has a minimum value limit in non-DEBUG mode, at least 1000 * 1024, which is 1MB |
level | Threshold level |
References bufferedStream, sese::io::FileStream::create(), fileStream, getDateTimeString(), maxSize, and sese::io::FileStream::T_WRITE_TRUNC.
|
overridenoexcept |
References bufferedStream, and fileStream.
|
overridevirtualnoexcept |
Implements sese::record::AbstractAppender.
References sese::io::FileStream::create(), getDateTimeString(), and sese::io::FileStream::T_WRITE_TRUNC.
|
private |
Referenced by BlockAppender(), and ~BlockAppender().
|
private |
Referenced by BlockAppender(), and ~BlockAppender().
|
private |
Referenced by BlockAppender().
|
private |
|
private |