Commit 5411e9ea authored by chenzhangyi01's avatar chenzhangyi01

Update docs with glog and some fix with the prev commit

Change-Id: Iea7faf7703180510cd62b1f38fb7d0b6afc260eb
parent 6fdeeac2
......@@ -89,6 +89,10 @@ If you want to use [cpu profiler](cpu_profiler.md) or [heap profiler](heap_profi
When you remove tcmalloc, not only remove the linking with tcmalloc but also the macros: `-DBRPC_ENABLE_CPU_PROFILER` and `-DBRPC_ENABLE_HEAP_PROFILER`.
## glog: 3.3+
brpc implementes a default [logging utility](../../src/butil/logging.h) which conflicts with glog. To replace this with glog, add *--with-glog* to config_brpc.sh
## valgrind: 3.8+
brpc detects valgrind automatically (and registers stacks of bthread). Older valgrind (say 3.2) is not supported.
......
......@@ -93,8 +93,10 @@ class LeakTracker : public LinkNode<LeakTracker<T> > {
stacktraces[count] = allocation_stack;
++count;
LOG(ERROR) << "Leaked " << node << " which was allocated by:";
//allocation_stack.OutputToStream(&LOG_STREAM(ERROR));
std::ostringstream err;
err << "Leaked " << node << " which was allocated by:";
allocation_stack.OutputToStream(&err);
LOG(ERROR) << err.str();
}
CHECK_EQ(0u, count);
......
......@@ -103,7 +103,7 @@ bool ParseProcMaps(const std::string& input,
// Due to splitting on '\n' the last line should be empty.
if (i == lines.size() - 1) {
if (!lines[i].empty()) {
DPLOG(WARNING) << "Last line not empty";
DLOG(WARNING) << "Last line not empty";
return false;
}
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment