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 |
---|---|---|
|
|
The GObj instance associated with the log message. |
|
|
The priority level of the log message, typically using syslog priority values. |
|
|
Optional JSON data to include in the log message. Not owned by the function. |
|
|
A string identifier categorizing the log message. |
|
|
A format string for the log message, similar to printf. |
|
|
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