summaryrefslogtreecommitdiffstats
path: root/liblog/logd_write.c
Commit message (Collapse)AuthorAgeFilesLines
* MingW doesn't handle __attribute__((weak)) for Windows PEAdam Lesinski2014-10-201-2/+1
| | | | | | | | | | | | | | | | Windows PE format doesn't have the same support for weak symbols as ELF does. The symbol android_log_id_to_name was strangely omitted from the resulting Windows executable and the callsite where it was supposed to be called was relaced with a different symbol, which caused a crash in AAPT on Windows. This change works due to a careful set of #ifdefs that ensure only one definition of android_log_id_to_name is defined, but there are other uses of __attribute__((weak)) which should be inspected. Change-Id: I3b58076e31d9b28c5143773a170e9ffda9fa3815
* Update for public android_set_abort_message().Dan Albert2014-08-191-2/+5
| | | | | | | | | Since android_set_abort_message() is quite helpful to the platform, it's becoming promoted to a real header with a non-private name. Bug: 17059126 Change-Id: I3ed12b66eb07f3a6a08366d5eee147809d9a3ce9 (cherry picked from commit 4047075da6e3796c759e439d4f0bbbac8d2c03f3)
* logd_write: set SOCK_CLOEXEC on socketNick Kralevich2014-07-021-1/+1
| | | | | | | | | | | Socket file descriptors remain open across exec unless SOCK_CLOEXEC is set. Enable this option, to avoid leaking file descriptors. See https://android-review.googlesource.com/53736 for a similar problem with the old logging code. Change-Id: I9e045d2291ae6680044ab86604f3ff2c55b5eaed
* implement LOG_EVENT_STRINGNick Kralevich2014-07-011-0/+22
| | | | | | | | Implement LOG_EVENT_STRING, so that native code can create new event log entries. This is needed to support logging SELinux denials to the event log. Change-Id: I6a269a832bc2f5e5da6c9dbd169ed2f901b49166
* liblog: cache getuid() syscallMark Salyzyn2014-06-021-7/+10
| | | | | BUG: 15315766 Change-Id: I8f889a1c6ede74f2621f1b8ea5fda666c4b9cba2
* liblog: set -WerrorMark Salyzyn2014-05-071-4/+9
| | | | | | | - Deal with some -Wunused issues - Cleanup UNUSED to __unused transition Change-Id: Icd33808d4c974625f4fd0a126a90a2b4c90c8314
* Switch to the new bionic fatal logging interface.Elliott Hughes2014-05-061-6/+7
| | | | | | | This is more general and will work for anyone's custom logging code, as long as they use ANDROID_LOG_FATAL priority. Change-Id: Iaf7fc0858fce04f3af407882a58ee5a827d50ddd
* logd: liblog: ALOG silently drops excessively long messagesMark Salyzyn2014-04-241-14/+29
| | | | | Bug: 14280914 Change-Id: Idddd29784625094e54144953c29f64692a88eee9
* Improve liblog's fatal logging.Elliott Hughes2014-04-241-1/+7
| | | | | | | This makes LOG_ALWAYS_FATAL and LOG_ALWAYS_FATAL_IF as good as regular assert(3). Change-Id: I0666684d30cae7baf23c64b33d35c1e43f81acf0
* logd: liblog: logcat: debuggerd: Add LOG_ID_CRASHMark Salyzyn2014-04-161-2/+3
| | | | Change-Id: Iea453764a1a4fc1661f461f10c641c30150e4d20
* liblog: deal with restart of logdMark Salyzyn2014-03-261-37/+97
| | | | | | | - API change, return -errno on failure for log writing - ENOTCONN results in a reconnection and a retry of the write Change-Id: Ib0a90b730edeaa7e3a3c9797e4e1b0c81b6adb0a
* logd: liblog: Thread IDs missing from logcat -v threadMark Salyzyn2014-03-211-7/+30
| | | | | | | - stuff caller's thread id into the packet. Bug: 13568206 Change-Id: I02d0cdf9b1d9e839ff8969f591db42dfe6e4cc95
* logd: liblog: 64-bit issuesMark Salyzyn2014-03-051-1/+4
| | | | | | | | | - structure packing - move towards log_time from struct timespec - extend log_time to cover differences between log_time and struct timespec Change-Id: I106ed0b609917306d170044054b5b32645f2a295
* liblog: enable logging to logd.Mark Salyzyn2014-02-281-46/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | * Modify liblog to send all messages to the new syslog user space daemon. Original-Change-Id: I0ce439738cd921efb2db4c1d6a289a96bdbc8bc2 Original-Change-Id: If4eb0d09409f7e9be3eb4bb7017073dc7e931ab4 Signed-off-by: Nick Kralevich <nnk@google.com> * Add a TARGET_USES_LOGD make flag for BoardConfig.mk to manage whether logd is enabled for use or not. * rename syslog to logd to avert confusion with bionic syslog * Add fake log support back in * prefilter for logging messages from logd * Fill in timestamps at logging source * update abstract log reader * switch from using suffix for id to v3 format * log a message when creating devices that a deprecated interface is being utilized. Signed-off-by: Mark Salyzyn <salyzyn@google.com> (cherry pick from commit 099e2c1f6f706a8600c1cef74cce9066fc315480) Change-Id: I47929a5432977a1d7235267a435cec0a7d6bd440
* Fix code style, put unused in the endKristian Monsen2014-01-281-2/+2
| | | | Change-Id: I7315b35049924d5067203a432584b8f29e5a1391
* Merge changes I70ab37d5,I716f89c0,I34c96adf,I77650923,I35b0d1ee, ...Mark Salyzyn2014-01-281-3/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changes: libsysutils: SocketListener export release libsysutils: Add iovec/runOnEachSocket liblog: support struct logger_event_v2 format liblog: update timestamp on NOTICE file libcutils: resolve warning in iosched_policy.c liblog: Add const pedantics logcat: Add -T flag (-t w/o assumption of -d) logcat: Add logcat test suite liblog: Add cpu utilization test liblog: Add liblog test suite debuggerd: Support newline split in log messages liblog: deprecate export LOGGER ioctl definitions liblog: deprecate export of LOGGER_LOG_* defines liblog: Add README liblog: resolve build warning messages liblog: high CPU usage from logcat liblog: fix build again liblog: drop use of sys/cdefs.h liblog: git_master@964770 build problem logcat: Incorporate liblog reading API debuggerd: Incorporate liblog reading API liblog: Interface to support abstracting log read adb: deprecate legacy log service interface adb: regression from Move list.c to inlines liblog: whitespace cleanup libcutils: bug str_parms.c:str_parms_get_float(). libcutils: UNUSED argument warnings libsysutils: Get rid of warnings libcutils: Move list.c to inlines on list.h
| * liblog: deprecate export of LOGGER_LOG_* definesMark Salyzyn2014-01-271-1/+6
| | | | | | | | | | | | (cherry picked from commit 73459a5c87dc9e7c2aeee00597b9d3cc8d9a190e) Change-Id: I263af8e889f8f2ad91b91757caf90a4d17823dab
| * liblog: whitespace cleanupMark Salyzyn2014-01-271-2/+2
| | | | | | | | | | | | | | | | | | - change cutils to liblog directory path - change tabs to spaces (cherry picked from commit c1215c0b46576771370ceb4e1b1d8fc5a7034cfd) Change-Id: I7d9db1e2b817ba0ec9a224340c5c7535a2387fd5
* | Fixes some warningsKristian Monsen2014-01-281-1/+5
|/ | | | | | | - Implicit decleared function - Unused variable Change-Id: Ia701e66682cb6788f0716a2ef7556ed07227f78f
* Move liblog headers to system/core/include/logColin Cross2013-07-241-3/+3
| | | | | | | | | 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
* liblog: fix fd leakageNick Kralevich2013-03-151-1/+3
| | | | | | | | | | | | | | | | | | | | | File descriptors remain open across an exec unless FD_CLOEXEC is set. Add O_CLOEXEC to the open() call to prevent file descriptor leakage. In particular, the following program will eventually run out of file descriptors: int main(int argc, char **argv) { printf("===== entering main =====\n"); ALOGW("entering main"); system("ls -l /proc/self/fd/"); execv(argv[0], argv); printf("exec failed\n"); return -1; } Change-Id: I5be43ab3b9f82a05f242b1f586454c50568af388
* Use Rlog instead of LogWink Saville2012-12-061-3/+14
| | | | | | | Changing __android_log_write so the tag warns users relying on the tag to direct log output to the radio buffer to instead use Rlog or RLOG. Change-Id: I04b7bb5e620c1ab22b9b495382a252b539947e28
* Collapse IMS tags into a prefix check.Jeff Sharkey2012-08-131-6/+4
| | | | | Bug: 6497974 Change-Id: I7fba1a07e2552ce16131b81f30d18eb3192de7ef
* Force IMS logging into radio log.Jeff Sharkey2012-07-171-2/+6
| | | | | Bug: 6497974 Change-Id: I4691f287b0abdce03ff211bd5b5b0037b8818ec9
* Fix SDK build.Brett Chabot2011-06-271-4/+0
| | | | | | Revert "Fix build warnings" This reverts commit 590e364868b6466e169f2647e95462ba2558dd00.
* Fix build warningsGlenn Kasten2011-06-241-0/+4
| | | | Change-Id: Ie24cf8e729813e4527c698fc7c1502a1efbc63e5
* Fixed LOG_ASSERT() compilation errors in native debug builds.Chris Pearson2010-07-161-7/+18
| | | | | | | | | | | | Invoking LOG_ASSERT, LOG_ALWAYS_FATAL or LOG_ALWAYS_FATAL_IF variadic macros without the printf format string arg caused compilation errors because the variable arg list (__VA_ARGS__) was eventually passed to __android_log_assert() func in place of a required parameter. This error only occured in debug builds because LOG_ASSERT() is a no-op in release builds. This change allows debug builds to succeed. Change-Id: I7e7b7de3e501133468ce083e0e0d6e699dd59667 Signed-off-by: Chris Pearson <christopherx.c.pearson@intel.com>
* remove stray printfs.Joe Onorato2010-03-031-2/+0
|
* Make logcat print both the main and system buffers by default. Make SLOGx ↵Joe Onorato2010-03-011-11/+51
| | | | macros work.
* Route all log tags with "RIL" prefix to radio buffer.John Michelau2009-08-191-5/+1
|
* AI 144245: Fix merge conflict for megering in the CDMA changes in to master ↵Wink Saville2009-04-021-1/+5
| | | | | | from donutburger. Automated import of CL 144245
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+230
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-230/+0
|
* auto import from //branches/cupcake/...@131421The Android Open Source Project2009-02-131-1/+1
|
* auto import from //branches/cupcake/...@126645The Android Open Source Project2009-01-151-0/+1
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+229