mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-24 17:41:34 +08:00
small fixes
This commit is contained in:
parent
8d83c0b2b0
commit
4ed60befbc
@ -19,7 +19,7 @@ int main(int argc, char* argv[])
|
||||
{
|
||||
|
||||
if(argc || argv) {};
|
||||
const unsigned int howmany = 1000000;
|
||||
const unsigned int howmany = 1000000;
|
||||
|
||||
auto fsink = std::make_shared<sinks::rotating_file_sink>("log", "txt", 1024*1024*50 , 5, 0);
|
||||
//auto fsink = std::make_shared<sinks::simple_file_sink>("simplelog", "txt");
|
||||
|
@ -9,7 +9,10 @@
|
||||
// stores its contents on the stack when possible, in vector<char> otherwise
|
||||
// NOTE: User should be remember that returned buffer might be on the stack!!
|
||||
|
||||
namespace c11log { namespace details {
|
||||
namespace c11log
|
||||
{
|
||||
namespace details
|
||||
{
|
||||
|
||||
template<std::size_t STACK_SIZE=128>
|
||||
class fast_buf
|
||||
|
@ -25,7 +25,7 @@ public:
|
||||
return _fastbuf.get();
|
||||
}
|
||||
|
||||
void reset_str()
|
||||
void clear()
|
||||
{
|
||||
_fastbuf.clear();
|
||||
}
|
||||
@ -73,9 +73,9 @@ public:
|
||||
return _dev.buf();
|
||||
}
|
||||
|
||||
void reset_str()
|
||||
void clear()
|
||||
{
|
||||
_dev.reset_str();
|
||||
_dev.clear();
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -38,13 +38,13 @@ public:
|
||||
line_logger& operator=(const line_logger&) = delete;
|
||||
line_logger& operator=(line_logger&&) = delete;
|
||||
|
||||
// The move ctor should only be called on start of logging line,
|
||||
// where no logging happened yet for this line so no need to copy the string from the other
|
||||
// The move ctor should only be called on start of logging line,
|
||||
// where no logging happened yet for this line so no need to copy the string from the other
|
||||
line_logger(line_logger&& other) :
|
||||
_callback_logger(other._callback_logger),
|
||||
_oss(),
|
||||
_level(other._level),
|
||||
_enabled(other._enabled) {}
|
||||
_enabled(other._enabled) {}
|
||||
|
||||
|
||||
~line_logger()
|
||||
|
Loading…
Reference in New Issue
Block a user