Log a formatted message not more than once in a specified period
void Ns_LogPeriodic ( Ns_LogSeverity inSeverity, time_t inPeriod, time_t *lasttime, long *count, char *inFormat, ...);
The Ns_LogPeriodic function writes formatted messages to the server log file. It is similar to the Ns_Log function, except that no matter how often Ns_LogPeriodic is called, it won't log another message until the specified time period has gone by. It is useful for errors that might occur very frequently, but you don't want that many messages filling up your log file.
The inSeverity
argument is the severity level of the message. Allowable values are:
The inPeriod
argument is the minimum time between logs in seconds.
The lasttime
argument is the time of the last call. This value should be initialized to 0 before calling this function the first time.
The count
argument is the count of the number of times the function is called between actual log messages so it can output a message like "This message has occurred n times in the last x seconds. This value should be initialized to 0 before calling this function the first time.
The inFormat
argument is a printf-style format string for the message.