~ubuntu-branches/ubuntu/precise/ceph/precise

« back to all changes in this revision

Viewing changes to src/common/Logger.cc

  • Committer: Bazaar Package Importer
  • Author(s): Clint Byrum, Clint Byrum, Micah Gersten
  • Date: 2011-02-12 22:50:26 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110212225026-yyyw4tk0msgql3ul
Tags: 0.24.2-0ubuntu1
[ Clint Byrum <clint@ubuntu.com> ]
* New upstream release. (LP: #658670, LP: #684011)
* debian/patches/fix-mkcephfs.patch: dropped (applied upstream)
* Removed .la files from libceph1-dev, libcrush1-dev and 
  librados1-dev (per Debian policy v3.9.1 10.2).
* debian/control: adding pkg-config as a build dependency
* debian/control: depend on libcrypto++-dev instead of libssl-dev
* debian/watch: added watch file

[ Micah Gersten <micahg@ubuntu.com> ]
* debian/control: add Homepage

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#include "Logger.h"
21
21
 
22
22
#include <iostream>
 
23
#include <memory>
23
24
#include "Clock.h"
24
25
 
25
26
#include "config.h"
74
75
void logger_start()
75
76
{
76
77
  Mutex::Locker l(logger_lock);
 
78
  logger_timer.init();
77
79
  flush_all_loggers();
78
80
}
79
81
 
166
168
  // schedule next flush event
167
169
  utime_t next;
168
170
  next.sec_ref() = start.sec() + last_flush + g_conf.logger_interval;
169
 
  next.usec_ref() = start.usec();
 
171
  next.nsec_ref() = start.nsec();
170
172
  generic_dout(20) << "logger now=" << now
171
173
                   << "  start=" << start 
172
174
                   << "  next=" << next 
178
180
static void stop()
179
181
{
180
182
  logger_lock.Lock();
181
 
  logger_timer.cancel_all();
182
 
  logger_timer.join();
 
183
  logger_timer.shutdown();
183
184
  logger_lock.Unlock();
184
185
}
185
186
 
261
262
  if (need_reset || logger_need_reset) {
262
263
    // reset the counters
263
264
    for (int i=0; i<type->num_keys; i++) {
264
 
      if (type->inc_keys[i]) {
265
 
        this->vals[i] = 0;
266
 
        this->fvals[i] = 0;
267
 
      }
 
265
      this->vals[i] = 0;
 
266
      this->fvals[i] = 0;
268
267
    }
269
268
    need_reset = false;
270
269
  }
310
309
      }
311
310
    }
312
311
  }
 
312
 
 
313
  // reset the counters
 
314
  for (int i=0; i<type->num_keys; i++) {
 
315
    if (type->inc_keys[i]) {
 
316
      this->vals[i] = 0;
 
317
      this->fvals[i] = 0;
 
318
    }
 
319
  }
 
320
 
313
321
  out << std::endl;
314
322
}
315
323