History log of /system/core/include/private/android_logger.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2b8157d9fd2a3dcb7370fe2614e2c47315186519 14-Mar-2016 Mark Salyzyn <salyzyn@google.com> liblog: add __android_log_pmsg_file_read

(cherry pick from commit 864e8e80e4f6b325ddacc25b0bd5d621eff0fb3a)

- This is considered an Android Private function, not exported
for general use.
- goal is to retreive a file's content from a series of log
messages from pmsg, to be retrieved after a reboot for
transfer to a persistent location.
- files are presented in reverse sorted order, first based on
_any_ numerical content, then by alphanumeric order.
- Add a gTest for this function, relies on gTest for
liblog.__android_log_pmsg_file_write from prior to reboot.

Bug: 27176738
Change-Id: If37ef423009bd28b598b233af3bccef3429bdc22
/system/core/include/private/android_logger.h
10bdf61e5ffbd99efec4d4168aee73a93c5e88be 10-Mar-2016 Mark Salyzyn <salyzyn@google.com> liblog: add __android_log_pmsg_file_write

(cherry pick from commit d4b061bde280fce9b5426b5738a02d42ec263c48)

- This is considered an Android Private function, not exported
for general use.
- goal is to record a file's content into a series of log
messages into pmsg, to be retrieved after a reboot for
transfer to a persistent location.
- filename reference is converted to a tag-unique
"<dirbase>:<filebase>".
- buffer and length representing the filename contents are
recorded, along with a sequence number placed into the nsec
time field to ANDROID_LOG_PMSG_FILE_MAX_SEQUENCE.
- Add a gTest for this function.

Bug: 27176738
Change-Id: If93df3ae8bfc1bb75516d4a1fd8dae0301af644b
/system/core/include/private/android_logger.h
58ba58a97c8ec56b2c2a32d6cda19a3a57e3cccf 07-Apr-2015 Nick Kralevich <nnk@google.com> logd: Don't embed a flexible array member within another struct

C (but not C++) has a concept of a flexible array member, which
is documented at https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html .
Using a flexible array member indicates that the structure is
really a header for a variable length object.

In logd's case, the variable length structure android_event_string_t
was embedded within another structure called
android_log_event_string_t. This makes gcc's __builtin_object_size()
function really confused. When compiling with C++,
__builtin_object_size(android_log_event_string_t.payload.data, 1)
would return 0, whereas if you compiled the code with C, the same
call would (properly) return -1.

Code which does automatic bounds checking, such as the proposed
patch at https://android-review.googlesource.com/145411 , will
cause problems for logd if this syntax is used.

Don't try to embed a variable length structure within another
structure. This doesn't appear to be valid C nor C++, and
while it's worked, it seems problematic.

Instead, inline the structure so it's one big happy structure.

Change-Id: I8ac02b7142a4f6560f5f80df2effcf720f9896fc
/system/core/include/private/android_logger.h
fa1c063febb8726f7b629ba04c083edf33b87789 04-Mar-2015 Mark Salyzyn <salyzyn@google.com> private: Add event payload structures to android_logger.h

- common android_event_header_t
- android_event_int_t ANDROID_TYPE_INT payload
- android_log_event_int_t single ANDROID_TYPE_INT event
- android_event_long_t ANDROID_TYPE_LONG payload
- android_log_event_long_t single ANDROID_TYPE_LONG event
- android_event_string_t ANDROID_TYPE_STRING payload
- android_log_event_string_t single ANDROID_TYPE_STRING event

Change-Id: I9e5fccba38e3f230c2c4ec7dec51ed110c460f95
/system/core/include/private/android_logger.h
d91ab5815d21ac89019e5590ff206a41336cc67e 15-Dec-2014 Mark Salyzyn <salyzyn@google.com> liblog: add pstore write

Used to push the Android log messages into pstore
(when available, and no propagation of error).

Change-Id: I9def8cf796d35d347f502d9745d5f42ec1200253
/system/core/include/private/android_logger.h
b5f6e45d6bddd2f6262bf387c3314dc744896320 16-Jan-2015 Mark Salyzyn <salyzyn@google.com> logd: create private/android_logger.h

- create a structure to depict the private header
expected at logd end of socket.
- utilize this new structure instead of unscalable
byte stream technique used to unpack in logd.

Change-Id: I2d0e5c3531c279f2dc1fbd74807210ff8d804de0
/system/core/include/private/android_logger.h