- if network read/write broken up, reassemble the pieces.
- Use a 20ms poll to check if a new fragment has been
sent by the other side.
- fixup logd-unit-tests to take a (simplified) fragment
from the liblog changes.
Bug: 14164765
Change-Id: I98ff87888c119e1e8349717646d0f733e8971bc8
- Add max_payload test
- Add dual_reader test
- Switch to EXPECT from ASSERT to increase test coverage
Bug: 13514601
Change-Id: I0e1c273e0ec430c0461e424731dbf166f2a3ce1b
- API change, return -errno on failure for log writing
- ENOTCONN results in a reconnection and a retry of the write
Change-Id: Ib0a90b730edeaa7e3a3c9797e4e1b0c81b6adb0a
1. socket() failures should skip close(), since sock is not an open fd
2. on other I/O related failures, preserve errno around the close() call
3. set errno to a meaningful value on check_log_success() failure
Change-Id: I0fb9e726ae5fee2f7b84344aa925e5159d57c360
Signed-off-by: Greg Hackmann <ghackmann@google.com>
- liblog android_logger_get_log_size and android_logger_get_readable_size
adjusted to return long instead of int because of -G flag extending range
NB: ifdef'd only for userdebug and eng builds
- liblog Add android_logger_[sg]et_prune_list and android_logger_set_log_size
- logcat Add -P, -p and -G flags
- logd Add LogWhiteBlackList and configurable log size
(cherry picked from commit 18a5432158)
Change-Id: I1572338c1b34bd968ad7867857ef708156ec3b6a
- structure packing
- move towards log_time from struct timespec
- extend log_time to cover differences between
log_time and struct timespec
Change-Id: I106ed0b609917306d170044054b5b32645f2a295
* 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
* 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
- followup to measure CPU utilization in liblog to
ensure this issue gets caught before a regression
passes into the labs. Threshold for failure is 1%.
(cherry picked from commit edadb2e719)
BUG: 12457855
Change-Id: I40568a72aeef2f554b19ad55f3dd3c02bc023f24
BUG: 12457855
- log_read.c poll timeout should be -1 instead of 0 when idling
(cherry picked from commit 080bbfab94)
Change-Id: I9082a15fae0fbf999c0ed516950a49d65a279298
log_read.c has to be in the target sources on all platforms, but
never needs to be in the host sources.
(cherry picked from commit 3c37fae4a4)
Change-Id: Ie0829f3f1daf16d151c401653dbef603b1c2f59d
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
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
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
Both libraries are needed to build four shared libraries in 64-bit
for 64-bit emulator with "-gpu on"
lib64OpenglRender.so
lib64EGL_translator.so
lib64GLES_CM_translator.so
lib64GLES_V2_translator.so
Change-Id: If57f72d4661a74f1d5e537568881f39132e0b43d
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
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
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