31 #include "mongo/base/disallow_copying.h" 33 #include "mongo/db/service_context.h" 75 static const NamespaceString
nss;
80 static HealthLog&
get(ServiceContext* ctx);
81 static HealthLog&
get(OperationContext* ctx);
88 bool log(
const HealthLogEntry& entry);
void shutdown(void)
Stop the worker thread.
Definition: health_log.cpp:58
The interface to the local healthlog.
Definition: health_log.h:46
HealthLog()
Required to use HealthLog as a ServiceContext decorator.
Definition: health_log.cpp:52
DeferredWriter _writer
Definition: health_log.h:91
Copyright (C) 2014 MongoDB Inc.
Definition: bson_collection_catalog_entry.cpp:38
bool log(const HealthLogEntry &entry)
Asynchronously insert the given entry.
Definition: health_log.cpp:70
Provides an interface for asynchronously adding to a collection.
Definition: deferred_writer.h:58
static const int64_t kMaxBufferSize
The maximum size of the in-memory buffer of health-log entries, in bytes.
Definition: health_log.h:60
void startup(void)
Start the worker thread writing the buffer to the collection.
Definition: health_log.cpp:54
static const NamespaceString nss
The name of the collection.
Definition: health_log.h:75
MONGO_DISALLOW_COPYING(HealthLog)