refactor(3p/nix/libexpr): Replace logging.h with glog

This commit is contained in:
Vincent Ambo 2020-05-19 01:24:50 +01:00
parent d0c44425e1
commit 939dd9f817
8 changed files with 37 additions and 35 deletions

View file

@ -1,17 +1,18 @@
#include "function-trace.hh"
#include <glog/logging.h>
namespace nix {
FunctionCallTrace::FunctionCallTrace(const Pos& pos) : pos(pos) {
auto duration = std::chrono::high_resolution_clock::now().time_since_epoch();
auto ns = std::chrono::duration_cast<std::chrono::nanoseconds>(duration);
printMsg(lvlInfo, "function-trace entered %1% at %2%", pos, ns.count());
LOG(INFO) << "function-trace entered " << pos << " at " << ns.count();
}
FunctionCallTrace::~FunctionCallTrace() {
auto duration = std::chrono::high_resolution_clock::now().time_since_epoch();
auto ns = std::chrono::duration_cast<std::chrono::nanoseconds>(duration);
printMsg(lvlInfo, "function-trace exited %1% at %2%", pos, ns.count());
LOG(INFO) << "function-trace exited " << pos << " at " << ns.count();
}
} // namespace nix