Don't include log/log_read.h in log/log.h

log/log.h primarily concerns itself with writing logs.  The few users
who read logs should directly include log/log_read.h.

Bug: 78370064
Test: build
Change-Id: Ie95c55ea2ffc76fc95768323d445ada6ad4f2520
This commit is contained in:
Tom Cherry 2020-04-17 09:38:55 -07:00
parent 10f8f5e363
commit c5c6d7d326
10 changed files with 17 additions and 9 deletions

View file

@ -43,6 +43,7 @@
#include <android-base/unique_fd.h>
#include <android/log.h>
#include <log/log.h>
#include <log/log_read.h>
#include <log/logprint.h>
#include <private/android_filesystem_config.h>
#include <unwindstack/DexFiles.h>

View file

@ -29,7 +29,6 @@
#include <log/log_id.h>
#include <log/log_main.h>
#include <log/log_radio.h>
#include <log/log_read.h>
#include <log/log_safetynet.h>
#include <log/log_system.h>
#include <log/log_time.h>
@ -64,6 +63,13 @@ extern "C" {
#endif
#endif
/*
* The maximum size of the log entry payload that can be
* written to the logger. An attempt to write more than
* this amount will result in a truncated log entry.
*/
#define LOGGER_ENTRY_MAX_PAYLOAD 4068
/*
* Event logging.
*/

View file

@ -47,13 +47,6 @@ struct logger_entry {
uint32_t uid; /* generating process's uid */
};
/*
* The maximum size of the log entry payload that can be
* written to the logger. An attempt to write more than
* this amount will result in a truncated log entry.
*/
#define LOGGER_ENTRY_MAX_PAYLOAD 4068
/*
* The maximum size of a log entry which can be read.
* An attempt to read less than this amount may result

View file

@ -19,6 +19,8 @@
#define HAVE_STRSEP
#endif
#include <log/logprint.h>
#include <assert.h>
#include <ctype.h>
#include <errno.h>
@ -37,7 +39,7 @@
#include <cutils/list.h>
#include <log/log.h>
#include <log/logprint.h>
#include <log/log_read.h>
#include <private/android_logger.h>
#define MS_PER_NSEC 1000000

View file

@ -31,6 +31,7 @@
#include <benchmark/benchmark.h>
#include <cutils/sockets.h>
#include <log/event_tag_map.h>
#include <log/log_read.h>
#include <private/android_logger.h>
BENCHMARK_MAIN();

View file

@ -40,6 +40,7 @@
#include <gtest/gtest.h>
#include <log/log_event_list.h>
#include <log/log_properties.h>
#include <log/log_read.h>
#include <log/logprint.h>
#include <private/android_filesystem_config.h>
#include <private/android_logger.h>

View file

@ -50,6 +50,7 @@
#include <android/log.h>
#include <log/event_tag_map.h>
#include <log/log_id.h>
#include <log/log_read.h>
#include <log/logprint.h>
#include <private/android_logger.h>
#include <processgroup/sched_policy.h>

View file

@ -22,6 +22,7 @@
#include <time.h>
#include <unistd.h>
#include <log/log_read.h>
#include <private/android_logger.h>
#include "LogBuffer.h"

View file

@ -34,6 +34,7 @@
#include <android-base/stringprintf.h>
#include <log/log_event_list.h>
#include <log/log_properties.h>
#include <log/log_read.h>
#include <private/android_filesystem_config.h>
#include "LogTags.h"

View file

@ -32,6 +32,7 @@
#include <android-base/stringprintf.h>
#include <cutils/sockets.h>
#include <gtest/gtest.h>
#include <log/log_read.h>
#include <private/android_filesystem_config.h>
#include <private/android_logger.h>
#ifdef __ANDROID__