TSTEXTLOGOBJECTCREATE(3ts)

πŸ“¦
version 9.2.5 Β· 4 versions
, in ubuntu noble, ubuntu questing

πŸ’– TSTEXTLOGOBJECTCREATE(3ts) πŸ’–

okay bestie, welcome to the Apache Traffic Server text logging API page β€” yes the title is all one word, no we did not choose that, it's giving TSTEXTLOGOBJECTCREATE(3ts) energy and we're rolling with it 🫢

This is where your plugin gets to write its own little diaries β€” text log objects, babes. Let's get into it.


✨ NAME ✨

TSTextLogObjectCreate β€” the traffic Server text logging API πŸ’…


🌸 SYNOPSIS 🌸

#include <ts/ts.h>

TSReturnCode TSTextLogObjectCreate(const char *filename, int mode,
TSTextLogObject *new_log_obj)

TSReturnCode TSTextLogObjectWrite(TSTextLogObject the_object, const char
*format, ...)

void TSTextLogObjectFlush(TSTextLogObject the_object)

TSReturnCode TSTextLogObjectDestroy(TSTextLogObject the_object)

void TSTextLogObjectHeaderSet(TSTextLogObject the_object, const char
*header)

TSReturnCode TSTextLogObjectRollingEnabledSet(TSTextLogObject
the_object, int rolling_enabled)

void TSTextLogObjectRollingIntervalSecSet(TSTextLogObject the_object,
int rolling_interval_sec)

void TSTextLogObjectRollingOffsetHrSet(TSTextLogObject the_object, int
rolling_offset_hr)

void TSTextLogObjectRollingSizeMbSet(TSTextLogObject the_object, int
rolling_size_mb)

look at all those signatures bestie, a whole squad of them, all matching, all serving πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so, plot twist, the description here is entirely about one member of the squad: TSTextLogObjectRollingEnabledSet(). she's the main character of this section, no cap πŸ‘‘

TSTextLogObjectRollingEnabledSet() sets the log rolling mode for the given object. and listen β€” this API must be used once the object is created and before writing into logs. like, timing is everything, this is not a "we'll do it later" situation. πŸ™ˆ

The rolling_enabled argument must be a valid proxy.config.log.rolling_enabled value. no random numbers, bestie, valid values only.

and if you never call TSTextLogObjectRollingEnabledSet()? then the log object takes it's log rolling mode from the global proxy.config.log.rolling_enabled setting. so it inherits the family vibe, cute. πŸŽ€

⚠️ real talk: it's also important to call TSTextLogObjectRollingEnabledSet() before any of the other APIs that modifies the rolling object.

why tho? because this API dictates which rolling mode should be used, and therefore it affects further modifications of the logging object. she decides the rules first, then everything else follows. that's the order. periodt. πŸ’…


🌈 SEE ALSO 🌈


2026, dev@trafficserver.apache.org


and that's the whole page, bestie!! ✨ source/version is 9.2, the date on this one is Feb 12, 2026, copyright belongs to 2026, dev@trafficserver.apache.org β€” go forth and log responsibly, mwah πŸ«ΆπŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from