Commit Graph

6 Commits

Author SHA1 Message Date
Danny Al-Gaaf
aad71dfd6b src/log/Entry.h: pass function parameter by reference
Fix "(performance) Function parameter 's' should be passed by reference."
from cppchecker.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-11 11:38:02 +01:00
Sage Weil
ae1c38f195 LogEntry: fix uninit in ctor
At (2): Non-static class member "m_thread" is not initialized in this constructor nor in any functions that it calls.
At (4): Non-static class member "m_prio" is not initialized in this constructor nor in any functions that it calls.
At (6): Non-static class member "m_subsys" is not initialized in this constructor nor in any functions that it calls.
CID 717229: Uninitialized scalar field (UNINIT_CTOR)
At (8): Non-static class member "m_static_buf" is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-28 13:18:05 -07:00
Sage Weil
37cdbcd4b4 log: fix up unittest
Fewer entries; compile.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-03-28 06:32:12 -07:00
Sage Weil
17a95c223e log: use PrebufferedStreambuf
It's faster than ostringstream!

Signed-off-by: Sage Weil <sage@newdream.net>
2012-03-27 10:44:52 -07:00
Sage Weil
23f0af3c06 test log performance with PreallocatedStreambuf
- faster than ostringstream in optimistic case
- same as ostreamstream + std::string assignment in worst case (use
  overflow string)

Signed-off-by: Sage Weil <sage@newdream.net>
2012-03-27 10:41:15 -07:00
Sage Weil
f41887e38d log: new logging infrastructure
- explicitly defined subsystems, and ceph_subsys_FOO enums to go with them
- modular log system with Entry object
- separate gather level and log level
- drop lots of DoutStreambuf hackery

Signed-off-by: Sage Weil <sage@newdream.net>
2012-03-27 10:41:12 -07:00