Skip to content

Commit

Permalink
Change calls to debug log to verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
Breakwell committed Apr 8, 2020
1 parent 10e6938 commit ba63e0a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions osquery/dispatcher/dispatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Status Dispatcher::addService(InternalRunnableRef service) {

auto thread = std::make_unique<std::thread>(
std::bind(&InternalRunnable::run, &*service));
DLOG(INFO) << "Adding new service: " << service->name() << " ("
VLOG(1) << "Adding new service: " << service->name() << " ("
<< service.get() << ") to thread: " << thread->get_id() << " ("
<< thread.get() << ") in process " << platformGetPid();

Expand Down Expand Up @@ -119,7 +119,7 @@ inline static void assureRun(const InternalRunnableRef& service) {

void Dispatcher::joinServices() {
auto& self = instance();
DLOG(INFO) << "Thread: " << std::this_thread::get_id()
VLOG(1) << "Thread: " << std::this_thread::get_id()
<< " requesting a join";

// Stops when service_threads_ is empty. Before stopping and releasing of the
Expand All @@ -138,24 +138,24 @@ void Dispatcher::joinServices() {
}
if (thread != nullptr) {
thread->join();
DLOG(INFO) << "Service thread: " << thread.get() << " has joined";
VLOG(1) << "Service thread: " << thread.get() << " has joined";
}
}

DLOG(INFO) << "Services and threads have been cleared";
VLOG(1) << "Services and threads have been cleared";
}

void Dispatcher::stopServices() {
auto& self = instance();
DLOG(INFO) << "Thread: " << std::this_thread::get_id()
VLOG(1) << "Thread: " << std::this_thread::get_id()
<< " requesting a stop";

WriteLock lock(self.mutex_);
self.stopping_ = true;
for (const auto& service : self.services_) {
assureRun(service);
service->interrupt();
DLOG(INFO) << "Service: " << service.get() << " has been interrupted";
VLOG(1) << "Service: " << service.get() << " has been interrupted";
}
}
} // namespace osquery

0 comments on commit ba63e0a

Please sign in to comment.