libc++ doesn't support std::mutex and friends for Windows yet, so we
just use a compatibility wrapper for now.
Change-Id: I2413d4c089e7d0fb232444043c6b772153035dab
Tests using files from /proc still fail on Windows (obviously), but
all tests are passing when run in Wine.
Change-Id: Ie4c3ba65b642202f8fcaec73332a53bee6115fba
Some of this code was unused, most didn't need to be exposed, and we
can just use basename(3).
Also use a better default program name than "unknown".
Change-Id: I62d990f64e4fd0c16aa4b7e907dd06e4f26ddcdd
While the defaults (logd or stderr) make sense for most use cases,
there are places that can only log to the kernel, or need to log to a
file, etc.
Allow the user to pass in an arbitrary logging object, and provide
LogdLogger and StderrLogger as defaults.
Change-Id: I62368acc795ff313242bb205d65017404bf64e88
LOGTO(dest, severity) and PLOGTO(dest, severity) log to other log
buffers. For example, `LOGTO(SYSTEM, FATAL) << "Foobar";`.
Change-Id: Id1ca1c8fdae72d69b73945ae9b006525d0be1582
We have to exclude the logging facilities for now (since we don't have
a std::mutex on Windows), but there's plenty else in here that is
worth having.
Change-Id: I6d1369e34e08ea2e88a0b1130c4462e5d35d99e2
Return a new vector rather than appending to the parameter.
Delimiters are also a string rather than a character. Split on any
character in the string.
Change-Id: I039b332ace5578590df9e7ca0e8fa3db28db30a3
ART already had a flavor of this, but it was specialized for their use
case a bit.
Note that the logging.* tests are currently disabled for the device
because there is no good way to capture the output of liblog. We can
make something that will execute logcat and then then scan the output,
but that's messy. Since we know it at least works on the host, we can
add better device tests later.
Change-Id: I47acd87a3312c0a5285b03f9c8dadef0c669f06a
LOCAL_CLANG := true is a no-op on Linux/Darwin host builds, but
apparently moves Windows binaries from mingw to clang, which is
completely untested.
Change-Id: Ibbc468d4a19a9e36bbcb93aa030fcc771af020ba
These are useful outside of ART. Nothing changed (aside from fixing
Trim to not segfault on empty strings), so ART should be able to move
to using these.
Change-Id: Id026ebffe8d31f784a91834786ab189680b13a0f