summaryrefslogtreecommitdiffstats
path: root/base/logging.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup base/logging.Dan Albert2015-04-031-28/+26
| | | | | | | | | 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
* Support arbitrary loggers.Dan Albert2015-04-031-46/+78
| | | | | | | | | | | 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
* Support logging to other log buffers.Dan Albert2015-04-031-12/+28
| | | | | | | LOGTO(dest, severity) and PLOGTO(dest, severity) log to other log buffers. For example, `LOGTO(SYSTEM, FATAL) << "Foobar";`. Change-Id: Id1ca1c8fdae72d69b73945ae9b006525d0be1582
* Remove LogMessage::LogLineLowStack.Dan Albert2015-04-021-44/+0
| | | | | | | This was ported over from ART, but even they only use it in a single place. Change-Id: Ia34dc54b56c764ede79b2957bf3dc8df0f1323ee
* Include what we use.Dan Albert2015-03-261-0/+1
| | | | Change-Id: If510431d3d445de94f781b4fdec2e1b445f7c294
* Move gettid() into libcutils.Dan Albert2015-03-231-23/+2
| | | | Change-Id: Ic8a15036833e6d129b7998d954b804be391de399
* Update string Split API.Dan Albert2015-03-231-2/+1
| | | | | | | | | 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
* Add google3 style logging to libbase.Dan Albert2015-03-201-0/+323
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