trace_vjson()

trace_vjson()#

Logs a JSON-formatted message with optional structured data, using a specified priority level.

Prototype

void trace_vjson(
    hgobj gobj,
    int priority,
    json_t *jn_data,
    const char *msgset,
    const char *fmt,
    va_list ap
);

Parameters

Key

Type

Description

gobj

hgobj

The GObj instance associated with the log message.

priority

int

The priority level of the log message, typically using syslog priority values.

jn_data

json_t *

Optional JSON data to include in the log message. Not owned by the function.

msgset

const char *

A string identifier categorizing the log message.

fmt

const char *

A format string for the log message, similar to printf.

ap

va_list

A variable argument list containing values to format into the log message.


Return Value

This function does not return a value.

Notes

The function formats the log message as JSON, including metadata such as timestamps and system information. It is used internally by logging functions like gobj_trace_json() and gobj_trace_msg().

Prototype

// Not applicable in JS

Prototype

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