The new command is 'rndc closelogs'.
#include <stdbool.h>
#include <isc/lex.h>
+#include <isc/log.h>
#include <isc/mem.h>
#include <isc/result.h>
#include <isc/string.h>
command_compare(command, NAMED_COMMAND_MODZONE))
{
result = named_server_changezone(named_g_server, cmdline, text);
+ } else if (command_compare(command, NAMED_COMMAND_CLOSELOGS)) {
+ isc_log_closefilelogs(named_g_lctx);
+ result = ISC_R_SUCCESS;
} else if (command_compare(command, NAMED_COMMAND_DELZONE)) {
result = named_server_delzone(named_g_server, lex, text);
} else if (command_compare(command, NAMED_COMMAND_DNSSEC)) {
#define NAMED_CONTROL_PORT 953
#define NAMED_COMMAND_ADDZONE "addzone"
+#define NAMED_COMMAND_CLOSELOGS "closelogs"
#define NAMED_COMMAND_DELZONE "delzone"
#define NAMED_COMMAND_DNSSEC "dnssec"
#define NAMED_COMMAND_DNSTAP "dnstap"
See also :option:`rndc delzone` and :option:`rndc modzone`.
+.. option:: closelogs
+
+ This command closes currently open log files. It is intended to be used
+ by external log rotation tools following this proceedure.
+
+ 1) rename the log files
+ 2) run ``rndc closelogs``
+ 3) optionally compress the log files
+
.. option:: delzone [-clean] zone [class [view]]
This command deletes a zone while the server is running.