Skip to content

Latest commit

 

History

History
39 lines (28 loc) · 1.37 KB

debug.rst

File metadata and controls

39 lines (28 loc) · 1.37 KB

Debug support

Middleware has extended debugging capabilities. These consist of different debugging levels and types of debug messages, allowing to track and catch different types of warnings, severe problems or simply output messages program flow messages (trace messages).

Module is highly configurable using library configuration methods. Application must enable some options to decide what type of messages and for which modules it would like to output messages.

With default configuration, printf is used as output function. This behavior can be changed with :c:macro:`LWESP_CFG_DBG_OUT` configuration.

For successful debugging, application must:

Tip

Check :ref:`api_lwesp_opt` for all modules with debug implementation.

An example code with config and latter usage:

.. literalinclude:: ../../examples_src/debug_opts.h
    :language: c
    :linenos:
    :caption: Debug configuration setup

.. literalinclude:: ../../examples_src/debug.c
    :language: c
    :linenos:
    :caption: Debug usage within middleware

.. doxygengroup:: LWESP_DEBUG