config: use our assert

Signed-off-by: Sage Weil <sage@newdream.net>
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>
log: flush on_exit

Signed-off-by: Sage Weil <sage@newdream.net>
assert: dump recent log entries on failed assertions

Signed-off-by: Sage Weil <sage@newdream.net>
common: add PrebufferedStreambuf

Simple streambuf that uses a preallocated buffer, and then spills over
into a std::string if necessary.

Signed-off-by: Sage Weil <sage@newdream.net>
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>
bench_log: simple util to time how long it takes to log stuff

Signed-off-by: Sage Weil <sage@newdream.net>
log: move create_entry() into Log interface

This will let us be smarter than putting it on the heap.

Signed-off-by: Sage Weil <sage@newdream.net>
do_autogen: control optimization level

-O 2 -> -O2

Signed-off-by: Sage Weil <sage@newdream.net>
utime_t: sprintf() method

Signed-off-by: Sage Weil <sage@newdream.net>
log/EntryQueue: no implicit trim

dequeue() things explicitly if you want to remove them.

Signed-off-by: Sage Weil <sage@newdream.net>
bench_log: flush

Signed-off-by: Sage Weil <sage@newdream.net>
prebufferedstreambuf: fix get_str()

Signed-off-by: Sage Weil <sage@newdream.net>
log: use PrebufferedStreambuf

It's faster than ostringstream!

Signed-off-by: Sage Weil <sage@newdream.net>
log: don't spam -1 to syslog; add err_to_syslog for consistency

This matches the stderr settings.

Signed-off-by: Sage Weil <sage@newdream.net>
log: throttle message submission, trim recent

Signed-off-by: Sage Weil <sage@newdream.net>
config: configure log thresholds

- max new entries before we wait for flush
- max recent entries to keep around

Signed-off-by: Sage Weil <sage@newdream.net>
hadoop: define subsystem, fix logging

Signed-off-by: Sage Weil <sage@newdream.net>
prebufferedstreambuf: fix typedef

'typename' not allowed here:

./common/PrebufferedStreambuf.h:27: error: using 'typename' outside of template

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
dout: no newlines on dout_emergency

Preserve old behavior to avoid breaking all the cli tests.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>