[master] timestamp suffixes for log files

4579.	[func]		Logging channels and dnstap output files can now
			be configured with a "suffix" option, set to
			either "increment" or "timestamp", indicating
			whether to use incrementing numbers or timestamps
			as the file suffix when rolling over a log file.
			[RT #42838]
This commit is contained in:
Evan Hunt
2017-03-08 23:20:40 -08:00
parent aa00b31b17
commit 612b2e2c0d
22 changed files with 613 additions and 129 deletions

View File

@@ -28,6 +28,7 @@
struct fstrm_iothr_options;
#endif /* HAVE_DNSTAP */
#include <isc/log.h>
#include <isc/refcount.h>
#include <isc/region.h>
#include <isc/sockaddr.h>
@@ -153,7 +154,8 @@ dns_dt_create(isc_mem_t *mctx, dns_dtmode_t mode, const char *path,
*/
isc_result_t
dns_dt_setupfile(dns_dtenv_t *env, isc_uint64_t max_size, int rolls);
dns_dt_setupfile(dns_dtenv_t *env, isc_uint64_t max_size, int rolls,
isc_log_rollsuffix_t suffix);
/*%<
* Sets up the dnstap logfile limits.
*
@@ -161,6 +163,8 @@ dns_dt_setupfile(dns_dtenv_t *env, isc_uint64_t max_size, int rolls);
*
* 'rolls' is the number of rolled files to retain.
*
* 'suffix' is the logfile suffix setting, increment or timestamp.
*
* Requires:
*
*\li 'env' is a valid dnstap environment.