mirror of
https://fuchsia.googlesource.com/third_party/pigweed.googlesource.com/pigweed/pigweed
synced 2024-09-20 05:41:06 +00:00
b19140275a
This completes the update of Sphinx and RST by removing the legacy Markdown support. It also adds custom CSS skeleton. Change-Id: I398a21208772cf2d2dd32dee0adac768630dd575 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/40621 Commit-Queue: Keir Mierle <keir@google.com> Pigweed-Auto-Submit: Keir Mierle <keir@google.com> Reviewed-by: Anthony DiGirolamo <tonymd@google.com> Reviewed-by: Ewout van Bekkum <ewout@google.com>
27 lines
981 B
ReStructuredText
27 lines
981 B
ReStructuredText
.. _module-pw_log_basic:
|
|
|
|
------------
|
|
pw_log_basic
|
|
------------
|
|
``pw_log_basic`` is a ``pw_log backend`` that sends logs over ``pw_sys_io`` by
|
|
default. The destination of ``pw_sys_io`` depends on the ``pw_sys_io`` backend
|
|
in use. This is controlled by the ``dir_pw_sys_io_backend`` variable in a
|
|
target's ``target_config.gni``.
|
|
|
|
The log output may be changed from ``pw_sys_io`` to an arbitrary function by
|
|
calling ``pw::log_basic::SetOutput``.
|
|
|
|
.. cpp:namespace:: pw::log_basic
|
|
|
|
.. cpp:function:: void SetOutput(void (*log_output)(std::string_view))
|
|
|
|
Set the log output function, which defaults ``pw_sys_io::WriteLine``. This
|
|
function is called with each formatted log message.
|
|
|
|
This module employs an internal buffer for formatting log strings, and currently
|
|
has a fixed size of 150 bytes. Any final log statements that are larger than
|
|
149 bytes (one byte used for a null terminator) will be truncated.
|
|
|
|
.. note::
|
|
The documentation for this module is currently incomplete.
|