Add a logging_no_op.cc when enable_tracing==0.

This should hopefully fix static initializer warnings when rolling webrtc
in Chromium.

TEST=logging_unittest succeeds with enable_tracing==1 and fails appropriately with enable_tracing==0.

Review URL: https://webrtc-codereview.appspot.com/939026

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3159 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
andrew@webrtc.org
2012-11-23 19:30:59 +00:00
parent 418443c531
commit c3e5d3422b
6 changed files with 49 additions and 31 deletions

View File

@ -73,7 +73,7 @@ TEST_F(LoggingTest, LogStream) {
std::string msg = "Important message";
expected_log_ << "(logging_unittest.cc:" << __LINE__ + 1 << "): " << msg;
LOG(LS_WARNING) << msg;
cv_->SleepCS(*crit_.get());
cv_->SleepCS(*crit_.get(), 2000);
}
}
@ -86,7 +86,7 @@ TEST_F(LoggingTest, LogFunctionError) {
expected_log_ << "(logging_unittest.cc:" << __LINE__ + 2
<< "): Foo failed: bar=" << bar << ", baz=" << baz;
LOG_FERR2(LS_ERROR, Foo, bar, baz);
cv_->SleepCS(*crit_.get());
cv_->SleepCS(*crit_.get(), 2000);
}
}