Rewrite syslog(3) to use Android logging.

Since we don't have syslogd on Android and you can't run one on a non-rooted
device, it's more useful if syslog output just goes to the regular Android
logging system.

Bug: 14292866
Change-Id: Icee7f088b97f88ccbdaf471b98cbac7f19f9210a
This commit is contained in:
Elliott Hughes
2014-07-21 16:35:24 -07:00
parent 1fb90a8aa0
commit 3ad8ecb64e
7 changed files with 105 additions and 413 deletions

View File

@@ -176,3 +176,14 @@ TEST(libc_logging, lld_LLONG_MIN) {
GTEST_LOG_(INFO) << "This test does nothing.\n";
#endif // __BIONIC__
}
TEST(libc_logging, m) {
#if defined(__BIONIC__)
char buf[BUFSIZ];
errno = EBADF;
__libc_format_buffer(buf, sizeof(buf), "<%m>");
EXPECT_STREQ("<Bad file number>", buf);
#else // __BIONIC__
GTEST_LOG_(INFO) << "This test does nothing.\n";
#endif // __BIONIC__
}