Since nothing new may be written to the log for a while, check if it needs
to be reopened in the mds/osd/mon tick() method.
extern int _dout_rename_output_file(); // after calling daemon()
extern int _dout_create_courtesy_output_symlink(const char *type, int n);
+static inline void _dout_check_log() {
+ _dout_lock.Lock();
+ if (_dout_need_open)
+ _dout_open_log();
+ _dout_lock.Unlock();
+}
static inline void _dout_begin_line() {
_dout_lock.Lock();
// reschedule
reset_tick();
+ _dout_check_log();
+
logclient.send_log();
if (laggy)
{
tick_timer = 0;
+ _dout_check_log();
+
// ok go.
dout(11) << "tick" << dendl;
assert(osd_lock.is_locked());
dout(5) << "tick" << dendl;
+ _dout_check_log();
+
if (got_sigterm) {
dout(0) << "got SIGTERM, shutting down" << dendl;
messenger->send_message(new MGenericMessage(CEPH_MSG_SHUTDOWN),