xref: /aosp_15_r20/external/pigweed/pw_log_fuchsia/docs.rst (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1.. _module-pw_log_fuchsia:
2
3==============
4pw_log_fuchsia
5==============
6.. pigweed-module::
7   :name: pw_log_fuchsia
8
9--------
10Overview
11--------
12The ``pw_log_fuchsia`` module provides a ``PW_HANDLE_LOG`` backend for the
13``pw_log`` module. The backend uses the ``fuchsia.logger.LogSink`` FIDL API
14to send logs. Only Bazel is supported because the Fuchsia SDK only supports Bazel.
15
16---
17API
18---
19Before logging, ``pw::log_fuchsia::InitializeLogging(async_dispatcher_t*)`` must
20be called to initialize the logging state.
21
22Two log flags are supported to help with logging during tests:
23``PW_LOG_FLAG_USE_PRINTF``, which uses printf to log instead of ``LogSink``,
24and ``PW_LOG_FLAG_IGNORE``, which skips logging the log.
25