commit | 0c68953778f9232dfa2edf2184d9c18b5d7bddcb | [log] [tgz] |
---|---|---|
author | Yabin Cui <yabinc@google.com> | Mon Jan 23 10:29:23 2017 -0800 |
committer | Yabin Cui <yabinc@google.com> | Wed Jan 25 15:50:47 2017 -0800 |
tree | a48b7ca82d1b1c48a8ac92ab4d6411e89f8e893c | |
parent | 1e7cdf3c7d2733f71a659c215100876168162083 [diff] [blame] |
base: support logging before enter main function. Bug: http://b/30974760 Test: run libbase_test. Change-Id: I3f45fc21e8fe6301b5fef027728ea91f2188911d
diff --git a/base/logging_test.cpp b/base/logging_test.cpp index 2d9c2ba..adb041b 100644 --- a/base/logging_test.cpp +++ b/base/logging_test.cpp
@@ -594,3 +594,7 @@ EXPECT_EQ(CountLineAborter::newline_count, 1U + 1U); // +1 for final '\n'. } + +__attribute__((constructor)) void TestLoggingInConstructor() { + LOG(ERROR) << "foobar"; +}