Home

Traffic Server Software Developers Kit

INKTextLogObjectWrite

Writes a text entry to a custom log file.

Prototype

InkReturnCode INKTextLogObjectWrite (INKTextLogObject the_object, char *format, ...)

Arguments

the_object is the log object to write to. You must first create this log file with INKTextLogObjectCreate.

char *format is a printf-style formatted statement to be printed.

... corresponds to the parameters in the formatted statement. A new line is automatically added to the end.

Description

Writes a text entry to a custom log file.

Example

Suppose you call the following:

int my_value = 2001;
INKTextLogObjectWrite (log, “my value: %d”, my_value);

If mode is set to ADD_TIMESTAMP, then the log should look like:

<timestamp> my value: 2001 
 
Returns

INK_SUCCESS if the API is called successfully.

INK_ERROR if an error occurs while calling the API or if an argument is invalid.