]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
debug: fix log append
authorSage Weil <sage@newdream.net>
Tue, 20 Jul 2010 17:38:26 +0000 (10:38 -0700)
committerSage Weil <sage@newdream.net>
Tue, 20 Jul 2010 17:38:26 +0000 (10:38 -0700)
ios::ate does not work as advertised!

Signed-off-by: Sage Weil <sage@newdream.net>
src/common/debug.cc

index f1c46a57c961f8dba1755c778b04d67f1ef75605..a252d7cbaa6c15d37d596bfc94860982c4ab1d39 100644 (file)
@@ -153,7 +153,7 @@ void _dout_open_log()
 
   _dout_out.close();
   // only truncate if log_per_instance is set.
-  _dout_out.open(_dout_path, g_conf.log_per_instance ? (ios::trunc | ios::out) : (ios::out | ios::ate));
+  _dout_out.open(_dout_path, g_conf.log_per_instance ? (ios::trunc | ios::out) : (ios::out | ios::app));
   if (!_dout_out.is_open()) {
     std::cerr << "error opening output file " << _dout_path << std::endl;
     _dout = &std::cout;