summaryrefslogtreecommitdiff
path: root/build.py
diff options
context:
space:
mode:
author Henri Chataing <henrichataing@google.com> 2023-10-20 09:06:51 -0700
committer Henri Chataing <henrichataing@google.com> 2024-02-06 00:59:45 +0000
commite08cbed3c13100b912b8209c706b42e5cfbabf53 (patch)
tree0bfd6396ca6a3636849e9470cfbced8f3088aa06 /build.py
parentfaa70d827096c19a4d1956f4f571b1f88cd4db71 (diff)
system: fmtlib logger implementation
- The fmtlib logger is implemented in <bluetooth/log.h>. The header defines the following templated logs function: template<typename T...> log::fatal(fmt::format_string<T...> fmt, T...args); log::error(..); log::warn(..); log::info(..); log::debug(..); log::verbose(..); - Front-end, logs are printed out by invoking these macros with the macro LOG_TAG defined _before_ the inclusion of #include <bluetooth/log.h> - Back-end, a single method must be implemented for all supported platforms (android, floss, host): namespace log_internal { void vlog(Level level, char const *tag, char const *file_name, int line, fmt::string_view fmt, fmt::format_args vargs); } - Default implementations are provided: + vlog_android: outputs to <log/log.h> __android_log_write_log_message + vlog_syslog: outputs to <syslog.h> syslog Bug: 305066880 Test: m libbluetooth_log Test: atest libbluetooth_log_test Flag: EXEMPT, logging utils Change-Id: Ic8a80f113b25d874c372d7dce8252d5428842ee8
Diffstat (limited to 'build.py')
-rwxr-xr-xbuild.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/build.py b/build.py
index 5e03c6388c..d47005a41f 100755
--- a/build.py
+++ b/build.py
@@ -127,6 +127,7 @@ REQUIRED_APT_PACKAGES = [
'liblz4-tool',
'libncurses5',
'libnss3-dev',
+ 'libfmt-dev',
'libprotobuf-dev',
'libre2-9',
'libre2-dev',