iwyu: //aos/logging/...
The full include-list for aos/logging/interface.h:
<stddef.h> // for size_t
<cstdarg> // for va_list, va_end, va_start
<string_view> // for string_view
"aos/logging/logging.h" // for log_level
"aos/macros.h" // for GOOD_PRINTF_FORMAT_TYPE
The full include-list for aos/logging/interface.cc:
"aos/logging/interface.h"
<algorithm> // for min
<cstdarg> // for va_list, va_end, va_copy, va_start
<cstdio> // for size_t, vsnprintf, stderr
<cstring> // for strlen, memcpy
<memory> // for shared_ptr, __shared_ptr_access
<ostream> // for operator<<, basic_ostream
<string> // for char_traits
<type_traits> // for common_type
"aos/die.h" // for VDie
"aos/logging/context.h" // for Context
"aos/logging/implementations.h" // for FillInMessage, PrintMessage, LogMessage
"aos/time/time.h" // for monotonic_clock
"glog/logging.h" // for ErrnoLogMessage, PLOG
The full include-list for aos/logging/context.h:
<sys/types.h> // for pid_t, size_t
<cinttypes> // for uint16_t
<memory> // for shared_ptr
<string_view> // for string_view
namespace aos::logging { class LogImplementation; } // lines 19-19
The full include-list for aos/logging/context.cc:
"aos/logging/context.h"
<sys/prctl.h> // for prctl, PR_GET_NAME
<unistd.h> // for getpid
<algorithm> // for min
<cstddef> // for size_t
<cstring> // for strcpy, strncmp
<limits> // for numeric_limits
<optional> // for optional
<ostream> // for operator<<, basic_ostream
<string> // for char_traits, operator+, string, operator<<, basic_string
"glog/logging.h" // for Check_LEImpl, CHECK_LE, ErrnoLogMessage, PLOG
The full include-list for aos/logging/implementations.h:
<sys/types.h> // for pid_t
<cstdarg> // for va_list, va_end, va_start
<cstdint> // for int32_t, uint16_t
<cstdio> // for FILE, size_t
<cstring> // for strcmp
<functional> // for function
<memory> // for shared_ptr
<string> // for string
<string_view> // for string_view
<utility> // for move
"aos/logging/context.h" // for Context, LOG_MESSAGE_LEN, LOG_MESSAGE_NAME_LEN
"aos/logging/interface.h" // for LogImplementation
"aos/logging/logging.h" // for log_level, DECL_LEVELS, ERROR, LOG_UNKNOWN
"aos/macros.h" // for GOOD_PRINTF_FORMAT_TYPE
"aos/time/time.h" // for monotonic_clock
The full include-list for aos/logging/implementations_test.cc:
"aos/logging/implementations.h"
<signal.h> // for SIGABRT
<stdlib.h> // for abort
<chrono> // for duration, duration_cast, operator-, nanoseconds, time_point, chrono
<cinttypes> // for PRId64, PRIu32
<string> // for string
"aos/logging/printf_formats.h" // for AOS_TIME_ARGS, AOS_TIME_FORMAT, AOS_LOGGING_BASE_ARGS, AOS_LOGGING_BASE_FORMAT
"aos/time/time.h" // for monotonic_clock
"glog/logging.h" // for Check_EQImpl, CHECK_EQ
"gtest/gtest.h" // for AssertionResult, Message, TestPartResult, Test, TestInfo, AssertionFailure, ASSERT_EQ, EXPECT_EQ, AssertionSuccess, TEST_F, EXPECT_TRUE, DeathTest, CmpHelperGT, CmpHelperNE, EXPECT_FALSE, TEST, KilledBySignal, ASSERT_EXIT, ASSERT_GT, ASSERT_NE, EXPECT_DEATH
The full include-list for aos/logging/dynamic_logging.h:
<string> // for string
"aos/events/event_loop.h" // for EventLoop
"aos/logging/dynamic_log_command_generated.h" // for DynamicLogCommand
"aos/macros.h" // for DISALLOW_COPY_AND_ASSIGN
The full include-list for aos/logging/dynamic_logging_test.cc:
"aos/logging/dynamic_logging.h"
<chrono> // for microseconds, operator+, chrono
<memory> // for unique_ptr
<ostream> // for operator<<
"aos/configuration.h" // for ReadConfig, Configuration
"aos/events/event_loop.h" // for EventLoop, TimerHandler, Sender, RawSender, Sender::MakeBuilder
"aos/events/simulated_event_loop.h" // for SimulatedEventLoopFactory
"aos/flatbuffers.h" // for FlatbufferDetachedBuffer
"aos/testing/path.h" // for ArtifactPath
"flatbuffers/buffer.h" // for AlignOf
"flatbuffers/flatbuffer_builder.h" // for FlatBufferBuilder
"glog/logging.h" // for GetReferenceableValue, Check_EQImpl, CHECK_EQ, COMPACT_GOOGLE_LOG_INFO, LogMessage, VLOG
"gtest/gtest.h" // for CaptureStderr, GetCapturedStderr, CmpHelperNE, Message, TestPartResult, EXPECT_EQ, TestInfo, EXPECT_NE, TEST_F, Test
The full include-list for aos/logging/log_namer.cc:
"aos/logging/log_namer.h"
<dirent.h> // for closedir, opendir, readdir, DIR, dirent
<mntent.h> // for endmntent, getmntent_r, setmntent, mntent
<unistd.h> // for access, readlink, sleep, symlink, unlink, F_OK, R_OK, W_OK
<cerrno> // for errno, ENOENT, EROFS
<cstdio> // for snprintf, asprintf, sscanf, FILE, size_t, ssize_t
<cstdlib> // for free
<cstring> // for strcmp
<ostream> // for operator<<, basic_ostream
<string> // for char_traits, allocator, operator+, string, operator<<, basic_string
"gflags/gflags.h" // for DEFINE_string
"glog/logging.h" // for LOG, LogMessage, COMPACT_GOOGLE_LOG_INFO, ErrnoLogMessage, PLOG, COMPACT_GOOGLE_LOG_FATAL, LogMessageFatal, COMPACT_GOOGLE_LOG_WARNING, VLOG
The full include-list for aos/logging/dynamic_logging.h:
<string> // for string
"aos/events/event_loop.h" // for EventLoop
"aos/logging/dynamic_log_command_generated.h" // for DynamicLogCommand
"aos/macros.h" // for DISALLOW_COPY_AND_ASSIGN
The full include-list for aos/logging/dynamic_logging.cc:
"aos/logging/dynamic_logging.h"
<ostream> // for operator<<
<string_view> // for operator==
"flatbuffers/string.h" // for String
"glog/logging.h" // for FLAGS_v, COMPACT_GOOGLE_LOG_WARNING, LOG, LogMessage
The full include-list for aos/logging/implementations.h:
<sys/types.h> // for pid_t
<cstdarg> // for va_list, va_end, va_start
<cstdint> // for int32_t, uint16_t
<cstdio> // for FILE, size_t
<cstring> // for strcmp
<functional> // for function
<memory> // for shared_ptr
<string> // for string
<string_view> // for string_view
<utility> // for move
"aos/logging/context.h" // for Context, LOG_MESSAGE_LEN, LOG_MESSAGE_NAME_LEN
"aos/logging/interface.h" // for LogImplementation
"aos/logging/logging.h" // for log_level, DECL_LEVELS, ERROR, LOG_UNKNOWN
"aos/macros.h" // for GOOD_PRINTF_FORMAT_TYPE
"aos/time/time.h" // for monotonic_clock
The full include-list for aos/logging/implementations.cc:
"aos/logging/implementations.h"
<chrono> // for duration_cast, duration, operator-, seconds, chrono, nanoseconds
<cstdarg> // for va_list
"aos/logging/printf_formats.h" // for AOS_LOGGING_BASE_ARGS, AOS_LOGGING_BASE_FORMAT
"aos/time/time.h" // for monotonic_clock
Signed-off-by: Stephan Pleines <pleines.stephan@gmail.com>
Change-Id: I4dec9a61e27e1092d033edcec947742bae11d44a
diff --git a/aos/logging/context.cc b/aos/logging/context.cc
index 5e5d53c..00b7f3c 100644
--- a/aos/logging/context.cc
+++ b/aos/logging/context.cc
@@ -8,11 +8,14 @@
#include <sanitizer/msan_interface.h>
#endif
#include <sys/prctl.h>
-#include <sys/types.h>
#include <unistd.h>
-#include <cerrno>
+#include <algorithm>
+#include <cstddef>
#include <cstring>
+#include <limits>
+#include <optional>
+#include <ostream>
#include <string>
extern char *program_invocation_name;
@@ -20,8 +23,6 @@
#include "glog/logging.h"
-#include "aos/logging/implementations.h"
-
namespace aos::logging::internal {
namespace {
diff --git a/aos/logging/context.h b/aos/logging/context.h
index bb53b99..10993e8 100644
--- a/aos/logging/context.h
+++ b/aos/logging/context.h
@@ -3,10 +3,7 @@
#include <sys/types.h>
-#include <atomic>
#include <cinttypes>
-#include <climits>
-#include <cstddef>
#include <memory>
#include <string_view>
diff --git a/aos/logging/dynamic_logging.cc b/aos/logging/dynamic_logging.cc
index a3461b5..48c9dcb 100644
--- a/aos/logging/dynamic_logging.cc
+++ b/aos/logging/dynamic_logging.cc
@@ -1,5 +1,9 @@
#include "aos/logging/dynamic_logging.h"
+#include <ostream>
+#include <string_view>
+
+#include "flatbuffers/string.h"
#include "glog/logging.h"
namespace aos::logging {
diff --git a/aos/logging/dynamic_logging.h b/aos/logging/dynamic_logging.h
index e3d3a6f..352d4b7 100644
--- a/aos/logging/dynamic_logging.h
+++ b/aos/logging/dynamic_logging.h
@@ -1,9 +1,8 @@
#include <string>
-#include "glog/logging.h"
-
#include "aos/events/event_loop.h"
#include "aos/logging/dynamic_log_command_generated.h"
+#include "aos/macros.h"
// The purpose of this class is to listen for /aos aos.logging.DynamicLogCommand
// and make changes to the log level of the current application based on that
diff --git a/aos/logging/dynamic_logging_test.cc b/aos/logging/dynamic_logging_test.cc
index 70e491d..21e0c36 100644
--- a/aos/logging/dynamic_logging_test.cc
+++ b/aos/logging/dynamic_logging_test.cc
@@ -1,12 +1,18 @@
#include "aos/logging/dynamic_logging.h"
-#include <sys/stat.h>
+#include <chrono>
+#include <memory>
+#include <ostream>
+#include "flatbuffers/buffer.h"
+#include "flatbuffers/flatbuffer_builder.h"
#include "glog/logging.h"
#include "gtest/gtest.h"
+#include "aos/configuration.h"
#include "aos/events/event_loop.h"
#include "aos/events/simulated_event_loop.h"
+#include "aos/flatbuffers.h"
#include "aos/testing/path.h"
using aos::testing::ArtifactPath;
diff --git a/aos/logging/implementations.cc b/aos/logging/implementations.cc
index da9e72b..042a09b 100644
--- a/aos/logging/implementations.cc
+++ b/aos/logging/implementations.cc
@@ -1,8 +1,6 @@
#include "aos/logging/implementations.h"
-#include <algorithm>
#include <chrono>
-#include <cinttypes>
#include <cstdarg>
#include "aos/logging/printf_formats.h"
diff --git a/aos/logging/implementations.h b/aos/logging/implementations.h
index 4e740f5..294750b 100644
--- a/aos/logging/implementations.h
+++ b/aos/logging/implementations.h
@@ -2,18 +2,13 @@
#define AOS_LOGGING_IMPLEMENTATIONS_H_
#include <sys/types.h>
-#include <unistd.h>
-#include <atomic>
-#include <climits>
-#include <cstdarg>
#include <cstdint>
-#include <cstdio>
-#include <cstring>
#include <functional>
#include <memory>
#include <string>
#include <string_view>
+#include <utility>
#include "aos/logging/context.h"
#include "aos/logging/interface.h"
diff --git a/aos/logging/implementations_test.cc b/aos/logging/implementations_test.cc
index 693a91e..08fdc7b 100644
--- a/aos/logging/implementations_test.cc
+++ b/aos/logging/implementations_test.cc
@@ -1,5 +1,8 @@
#include "aos/logging/implementations.h"
+#include <signal.h>
+#include <stdlib.h>
+
#include <chrono>
#include <cinttypes>
#include <string>
diff --git a/aos/logging/interface.cc b/aos/logging/interface.cc
index e0ce6a8..326f28e 100644
--- a/aos/logging/interface.cc
+++ b/aos/logging/interface.cc
@@ -1,9 +1,12 @@
#include "aos/logging/interface.h"
+#include <algorithm>
#include <cstdarg>
#include <cstdio>
#include <cstring>
-#include <functional>
+#include <memory>
+#include <ostream>
+#include <string>
#include <type_traits>
#include "glog/logging.h"
@@ -11,6 +14,7 @@
#include "aos/die.h"
#include "aos/logging/context.h"
#include "aos/logging/implementations.h"
+#include "aos/time/time.h"
namespace aos::logging {
namespace internal {
diff --git a/aos/logging/interface.h b/aos/logging/interface.h
index d2663e7..9889078 100644
--- a/aos/logging/interface.h
+++ b/aos/logging/interface.h
@@ -1,9 +1,9 @@
#ifndef AOS_LOGGING_INTERFACE_H_
#define AOS_LOGGING_INTERFACE_H_
+#include <stddef.h>
+
#include <cstdarg>
-#include <functional>
-#include <string>
#include <string_view>
#include "aos/logging/logging.h"
@@ -13,8 +13,6 @@
namespace aos {
-struct MessageType;
-
namespace logging {
// Takes a message and logs it. It will set everything up and then call DoLog
diff --git a/aos/logging/log_namer.cc b/aos/logging/log_namer.cc
index 412c74e..4b65687 100644
--- a/aos/logging/log_namer.cc
+++ b/aos/logging/log_namer.cc
@@ -1,23 +1,19 @@
#include "aos/logging/log_namer.h"
#include <dirent.h>
-#include <fcntl.h>
#include <mntent.h>
-#include <pwd.h>
-#include <sys/types.h>
#include <unistd.h>
#include <cerrno>
#include <cstdio>
#include <cstdlib>
#include <cstring>
-#include <ctime>
+#include <ostream>
#include <string>
+#include "gflags/gflags.h"
#include "glog/logging.h"
-#include "aos/configuration.h"
-
#if defined(__clang)
#pragma clang diagnostic ignored "-Wformat-nonliteral"
#elif defined(__GNUC__)
diff --git a/tools/iwyu/by_hand.imp b/tools/iwyu/by_hand.imp
index 66dfcd9..bbbeec8 100644
--- a/tools/iwyu/by_hand.imp
+++ b/tools/iwyu/by_hand.imp
@@ -46,5 +46,8 @@
# nlohmann
{ "include": ["<nlohmann/json.hpp>", "private", "\"nlohmann/json.hpp\"", "public"] },
{ "include": ["<nlohmann/json_fwd.hpp>", "private", "\"nlohmann/json_fwd.hpp\"", "public"] },
+
+ # aos
+ { "symbol": ["log_level", "private", "\"aos/logging/logging.h\"", "public"] },
]