aboutsummaryrefslogtreecommitdiffstats
path: root/liblog/logprint.c
Commit message (Collapse)AuthorAgeFilesLines
* ADB Logcat colored output.Pierre Zurek2012-07-101-14/+68
| | | | | | | | | This patch adds a new '-C' option to logcat so that the output is colored with colors similar to the ones in DDMS. Simply type "adb logcat -C" to use it. Works well with bash in gnome-terminal. Change-Id: Ie72199ecca0e04f2082c993f5763646bb09da61ea
* Fixed two 64-bit porting issues; Make pid/tid type consistentAndrew Hsieh2012-02-291-5/+5
| | | | | | | | 1. In printf, use "%zu" for variable of type size_t 2. Print tid in %5d 3. Make type of pid/tid in AndroidLogEntry and logger_entry consistent Change-Id: I3e3d9536ee58823f349a4734ae093d30eabe1bfe
* Gracefully handle truncated log messages.Jeff Sharkey2011-10-261-6/+23
| | | | | Bug: 5522726 Change-Id: I8637c7da854ec1ecb321632c45ee9bc2edc94a67
* liblog: do better checks of log messages.Nick Kralevich2011-10-181-14/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | Testing: The following test cases all passed and generated log entries: # echo -n '\03foo\0bar\0' > /dev/log/main # echo -n '\03\0bar\0' > /dev/log/main # echo -n '\03\0a\0' > /dev/log/main The following entries were successfully processed by logcat but produced no log entries: # echo -n '\03\0\0' > /dev/log/main # echo -n '\03a\0\0' > /dev/log/main # echo -n '\03b\0\0' > /dev/log/main Also tested the pathological error condition: cat /dev/urandom > /dev/log/main which produced many "+++ LOG: malformed log entry" errors. Bug: 5478600 Change-Id: I53bc79507242dcfc14445746c29edf47be0a90b4
* liblog: ensure that the message length is consistentNick Kralevich2011-10-171-1/+7
| | | | | | | | | When parsing log entries which may have embedded \0s, it's possible for entry->messageLen to not be the actual length of the string in entry->message. Detect this condition. Bug: 5417417 Change-Id: I712cac7696af7831e24765b5a1b345d6ff5fb407
* Add checking for log entry formatKenny Root2011-10-031-4/+16
| | | | | | | The log tag may be zero length if corrupted, so check for this condition. Change-Id: I7616226dabe78a85859b0ab53aca08f734dbdd84
* merge from open-source masterThe Android Open Source Project2010-03-081-0/+10
|\ | | | | | | Change-Id: I698b3c16bdef8751cc857b00f815cb2f95465431
| * Fix Heap Corruption from too long of a TAGKeith Preston2010-02-181-0/+10
| | | | | | | | | | | | snprintf has a weird return value. It returns what would have been written given a large enough buffer. In the case that the prefix is longer then our buffer(128), it messes up the calculations below possibly causing heap corruption. To avoid this we double check and set the length at the maximum (size minus null byte
* | Make logcat print both the main and system buffers by default. Make SLOGx ↵Joe Onorato2010-03-011-6/+1
|/ | | | macros work.
* 1. added macro definitions to AndroidConfig.hAlexey Tarasov2008-11-071-1/+0
| | | | 2. removed unnecessary include of <alloca.h>
* Initial ContributionThe Android Open Source Project2008-10-211-0/+972