diff options
author | Yabin Cui <yabinc@google.com> | 2017-01-23 10:29:23 -0800 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2017-01-25 15:50:47 -0800 |
commit | 0c68953778f9232dfa2edf2184d9c18b5d7bddcb (patch) | |
tree | a48b7ca82d1b1c48a8ac92ab4d6411e89f8e893c /base/logging_test.cpp | |
parent | 1e7cdf3c7d2733f71a659c215100876168162083 (diff) | |
download | system_core-0c68953778f9232dfa2edf2184d9c18b5d7bddcb.tar.gz system_core-0c68953778f9232dfa2edf2184d9c18b5d7bddcb.tar.bz2 system_core-0c68953778f9232dfa2edf2184d9c18b5d7bddcb.zip |
base: support logging before enter main function.
Bug: http://b/30974760
Test: run libbase_test.
Change-Id: I3f45fc21e8fe6301b5fef027728ea91f2188911d
Diffstat (limited to 'base/logging_test.cpp')
-rw-r--r-- | base/logging_test.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/base/logging_test.cpp b/base/logging_test.cpp index 2d9c2baec..adb041b32 100644 --- a/base/logging_test.cpp +++ b/base/logging_test.cpp @@ -594,3 +594,7 @@ TEST(logging, LOG_FATAL_ABORTER_MESSAGE) { EXPECT_EQ(CountLineAborter::newline_count, 1U + 1U); // +1 for final '\n'. } + +__attribute__((constructor)) void TestLoggingInConstructor() { + LOG(ERROR) << "foobar"; +} |