diff --git a/example/example.cpp b/example/example.cpp index 54cd2e47..07885927 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -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("log", "txt", 1024*1024*50 , 5, 0); //auto fsink = std::make_shared("simplelog", "txt"); @@ -27,7 +27,7 @@ int main(int argc, char* argv[]) logger cout_logger ("cout", {null_sink, sinks::stdout_sink()}); - cout_logger.info() << "Hello cout logger!"; + cout_logger.info() << "Hello cout logger!"; logger my_logger ("my_logger", {null_sink}); diff --git a/include/c11log/details/fast_buf.h b/include/c11log/details/fast_buf.h index c62bfa73..96d32882 100644 --- a/include/c11log/details/fast_buf.h +++ b/include/c11log/details/fast_buf.h @@ -9,7 +9,10 @@ // stores its contents on the stack when possible, in vector otherwise // NOTE: User should be remember that returned buffer might be on the stack!! -namespace c11log { namespace details { +namespace c11log +{ +namespace details +{ template class fast_buf diff --git a/include/c11log/details/fast_oss.h b/include/c11log/details/fast_oss.h index bd52ef38..bca896fb 100644 --- a/include/c11log/details/fast_oss.h +++ b/include/c11log/details/fast_oss.h @@ -19,14 +19,14 @@ public: str_devicebuf(str_devicebuf&& other) = delete; str_devicebuf& operator=(const str_devicebuf&) = delete; str_devicebuf& operator=(str_devicebuf&&) = delete; - + bufpair_t buf() { return _fastbuf.get(); } - void reset_str() - { + void clear() + { _fastbuf.clear(); } @@ -39,7 +39,7 @@ protected: // copy the give buffer into the accumulated string. // reserve initially 128 bytes which should be enough for common log lines std::streamsize xsputn(const char_type* s, std::streamsize count) override - { + { _fastbuf.append(s, static_cast(count)); return count; } @@ -73,9 +73,9 @@ public: return _dev.buf(); } - void reset_str() + void clear() { - _dev.reset_str(); + _dev.clear(); } private: diff --git a/include/c11log/details/line_logger.h b/include/c11log/details/line_logger.h index 494f6b4e..47d91372 100644 --- a/include/c11log/details/line_logger.h +++ b/include/c11log/details/line_logger.h @@ -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), + _callback_logger(other._callback_logger), _oss(), _level(other._level), - _enabled(other._enabled) {} + _enabled(other._enabled) {} ~line_logger()