stdout_write()

stdout_write()#

stdout_write() writes a log message to the standard output with a priority label.

Prototype

int stdout_write(
    void   *v,
    int     priority,
    const char *bf,
    size_t  len
);

Parameters

Key

Type

Description

v

void *

Unused parameter, included for compatibility with log handler function signatures.

priority

int

Log priority level, determining the severity of the message.

bf

const char *

Pointer to the log message string.

len

size_t

Length of the log message string.


Return Value

Returns 0 on success, or -1 if the input parameters are invalid.

Notes

The function applies ANSI color codes to differentiate log levels visually.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples