Cleanup the headers; we really don't want to encourage any more
cutils/list.h usage...
Remove __android_log_uid() since the only remaining users are built
for device, so they can just use getuid() directly.
Test: build
Change-Id: I62be2c1e43d83807deaa9342afcc72459947cf15
Remove the transport available and open functions since the writers
are able to manage their own state. Remove the initialization dance
with write_to_log, since it is unneeded once this is removed as well.
Remove the global lock around the close() functions as correct locking
has been added to the writers in a previous change.
Test: logging works, liblog-unit-tests
Change-Id: If7fa11e773763d0b5fcb2e696ad1c88ff4a4cfdf
This code was introduced to help performance by skipping sending these
messages to logd when logd would later drop them. However it has
multiple flaws:
1) Event logs aren't super common and non-loggable event logs are even
less common, so it would be a trivial benefit if any.
2) This code is not particularly safe as written, which is even
acknowledged in the comments.
3) This forces processes that write event logs to allocate a rather
sizable amount of memory.
Therefore, it's better to simply remove this and let logd drop these
messages when it receives them.
Bug: 139705697
Test: logging works, liblog-unit-tests
Change-Id: Ide01574112e173d4922137b3d3868cf8c2c09086
The old code did not free the transports, just unlink their nodes from
the linked list, so there was no race condition between close() and
other threads writing to the logs. By settings these to nullptr, I
introduced a race condition, but setting them to nullptr isn't
necessary, so let's simply not do that.
Test: liblog-unit-tests
Change-Id: Iec0b680addd13b5d30bd91ccef5bdeab6bf797b0
These checks are not needed; all callers are in this file and there's
only one possible situation: that we have valid pointers and sizes.
Test: liblog-unit-tests, log.tag.* properties still work
Change-Id: I8b385d5124c2d93cd99a352e30f745b075c8bd09
Now that we only have one transport in a given build configuration,
there is no need to have these lists.
Test: liblog-unit-tests
Change-Id: I3fdcdc33c1224a9522080ea06f36f14c83d946ac
There are no users; future versions will need to be more generic to
support the libbase style Logger/Aborter options.
Test: build, liblog-unit-tests
Change-Id: Ia4571cd39d3e499f18306920ecbf40ea8878fb81
There are no users of the liblog stderr logger, but 66 users of
android::base::StderrLogger. We'll prefer that format and work to
merge it into liblog.
Test: liblog-unit-tests
Change-Id: Ifad24b27ac0f51379b925f6644caa1f6f3d9ad81
liblog has left over code from local_logger that allows for reading
from multiple sources and merging the contents. Since we've already
removed local_logger, this change removes the rest of this code.
Test: liblog-unit-tests
Change-Id: I5685ad6c1e7cbcaa0a660ed10f47714784a40791
The code section is already marked as to be removed, simply suppress
the -Wstring-plus-int warning.
Test: m checkbuild
Bug: 128878287
Change-Id: I95a03aca90dbb5d27db49f5baf534cbaacf9b830
readv() isn't used by anyone, writev() has one easily replaced user.
uio.h can be left as a private header for windows compatibility with
struct iovec.
Test: build
Change-Id: I33d4c6bdee6fd818271f78ae06abdd2aa09430f2