logging: Clarify contract of log_output_func_t

The log_output_func_t backend function is supposed to either process or
drop bytes and return the amount of those to the caller. Clarify this in
the documentation.

Fixes #12241

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit is contained in:
Carles Cufi 2019-03-26 18:35:54 +01:00 committed by Carles Cufí
parent 6f011c95c4
commit 082cf7ac64

View file

@ -50,7 +50,11 @@ extern "C" {
* @param length Data length.
* @param ctx User context.
*
* @return Number of bytes processed.
* @return Number of bytes processed, dropped or discarded.
*
* @note If the log output function cannot process all of the data, it is
* its responsibility to mark them as dropped or discarded by returning
* the corresponding number of bytes dropped or discarded to the caller.
*/
typedef int (*log_output_func_t)(u8_t *buf, size_t size, void *ctx);