summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuren Baghdasaryan2018-07-27 14:47:26 -0500
committerSuren Baghdasaryan2018-08-01 19:55:01 -0500
commitbb20b9e6b85c381199a495a7dfdbbfd57fcb1705 (patch)
treeb0a6967d0408d1290b8e935fce2a839c884a8e67 /liblog/include_vndk
parent8f2a34a89b7ff1263217049fe837237b3af16814 (diff)
downloadplatform-system-core-bb20b9e6b85c381199a495a7dfdbbfd57fcb1705.tar.gz
platform-system-core-bb20b9e6b85c381199a495a7dfdbbfd57fcb1705.tar.xz
platform-system-core-bb20b9e6b85c381199a495a7dfdbbfd57fcb1705.zip
liblog: Add functions to reset log context
Add android_log_parser_reset and android_log_reset to reset reader/writer log context. This allows to generate multiple log messages of the same format without context reallocation. Change-Id: Icb0f15855378aa4e66fc671ffefd15d9df6fee1e
Diffstat (limited to 'liblog/include_vndk')
-rw-r--r--liblog/include_vndk/log/log_event_list.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/liblog/include_vndk/log/log_event_list.h b/liblog/include_vndk/log/log_event_list.h
index cbd309174..9f74534be 100644
--- a/liblog/include_vndk/log/log_event_list.h
+++ b/liblog/include_vndk/log/log_event_list.h
@@ -63,6 +63,13 @@ int android_log_write_float32(android_log_context ctx, float value);
63/* NB: LOG_ID_EVENTS and LOG_ID_SECURITY only valid binary buffers */ 63/* NB: LOG_ID_EVENTS and LOG_ID_SECURITY only valid binary buffers */
64int android_log_write_list(android_log_context ctx, log_id_t id); 64int android_log_write_list(android_log_context ctx, log_id_t id);
65 65
66/* Reset writer context */
67int android_log_reset(android_log_context ctx);
68
69/* Reset reader context */
70int android_log_parser_reset(android_log_context ctx,
71 const char* msg, size_t len);
72
66/* Finished with reader or writer context */ 73/* Finished with reader or writer context */
67int android_log_destroy(android_log_context* ctx); 74int android_log_destroy(android_log_context* ctx);
68 75