summaryrefslogtreecommitdiffstats
path: root/liblog/logprint.c
Commit message (Collapse)AuthorAgeFilesLines
* liblog: logcat: Add printable format modifierMark Salyzyn2015-06-041-31/+182
| | | | | | | | | | | | | | | (cherry pick from commit b932b2f8bac124b088edc93966281cca4567dc54) - added printable format modifier: logcat -v printable - opencoded borrowed individual utf8 validity checking algorithm from utf8_length() in libutils/Unicode.cpp - if considered basic one-character ASCII, use popular \x escape sequences for non-printable - logprint convert to C comments to drop mixed-mode Bug: 19000361 Change-Id: I122a5b8fb41216fc0bc816178c0b768f3df56586
* logcat: liblog: Add "usec" format argumentMark Salyzyn2015-05-131-12/+27
| | | | | | | | | | (cherry pick from commit e1f2004ecc05ce2d5d4313d16c7791594643f2ef) - Add additional 3 digits of time precision for time output adding in the reporting of usec - Remove trailing space in header file Change-Id: Ifb560850b8e01080e126fbaeab640db71cce3eea
* Add float support to binary event log.Jeff Brown2015-04-281-3/+27
| | | | | Bug: 20664753 Change-Id: Ib4752bd785496dab5bb4d4979d5d80f662adbdfa
* Revert "liblog: logprint use <endian.h>"Mark Salyzyn2015-03-061-5/+25
| | | | | | | This reverts commit 66bfc5ccbda1c36923230b8dea36e86e8ac62d67. Bug: 19634248 Change-Id: I7c4851a247042193674f226fd0d5c5663e8074c7
* liblog: logprint use <endian.h> part deuxMark Salyzyn2015-03-041-0/+1
| | | | Change-Id: I042194d0f5ec444dd192ee9da50d6b48d556f8ac
* liblog: logprint use <endian.h>Mark Salyzyn2015-03-041-25/+4
| | | | Change-Id: I0ec0fe3e954f6f04964d58e57c817d28057b630b
* liblog: logcat color output corrupted on 32-bitMark Salyzyn2015-01-221-1/+1
| | | | | | sizeof(suffixBuf), not sizeof(suffixLen)! Change-Id: I6e085089237585bb8b406372639b644556747699
* Liblog: Remove unused functionAndreas Gampe2014-11-241-9/+0
| | | | | | For build-system CFLAGS clean-up, remove unused function. Change-Id: I8c28c4bbbadaea6a5b32483e9e220794967bdd4e
* kill HAVE_LOCALTIME_RYabin Cui2014-11-131-2/+2
| | | | | Bug: 18361583 Change-Id: Icdc745a5204bba26c6438d16ed38ec791e136163
* liblog: logcat: colored output.Pierre Zurek2014-09-111-30/+78
| | | | | | | | | | | This patch adds a new '-v color' option to logcat so that the output is colored similar to the ones in DDMS. Simply type "adb logcat -v color" to use it. Works well with bash in gnome-terminal. NO GUARANTEE IT WILL WORK ON A NON xterm STYLE TERMINAL. Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com> Signed-off-by: Mark Salyzyn <salyzyn@google.com> Change-Id: I9189c5f27fed991579edbcbc6834536eb8112152
* liblog: set -WerrorMark Salyzyn2014-05-071-33/+5
| | | | | | | - Deal with some -Wunused issues - Cleanup UNUSED to __unused transition Change-Id: Icd33808d4c974625f4fd0a126a90a2b4c90c8314
* liblog: logcat: Move library print test into gTestMark Salyzyn2014-05-021-85/+0
| | | | Change-Id: Icd33808d4c974625f4fd0a126a90a2b4c90c8315
* liblog: support struct logger_event_v2 formatMark Salyzyn2014-01-271-6/+15
| | | | | | (cherry picked from commit c176e14ce3fd28432e2eaca7bc7a60046dd8be40) Change-Id: I34c96adffab3478dae8f5a2597a840caad5092cc
* liblog: whitespace cleanupMark Salyzyn2014-01-271-1/+1
| | | | | | | | | - change cutils to liblog directory path - change tabs to spaces (cherry picked from commit c1215c0b46576771370ceb4e1b1d8fc5a7034cfd) Change-Id: I7d9db1e2b817ba0ec9a224340c5c7535a2387fd5
* Move liblog headers to system/core/include/logColin Cross2013-07-241-2/+2
| | | | | | | | | Move the liblog headers to log/ instead of cutils/ to complete the separation of libcutils and liblog. cutils/log.h still exists and includes log/log.h in order to support the many existing modules that use cutils/log.h. Change-Id: I2758c9f4aedcb809ca7ba8383d0f55041dd44345
* 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