may access any variables already defined. The logging may be adjusted with
the &'opts'& option, which takes the same values as the &`-d`& command-line
option.
-Logging started this way may be stopped, and the file removed,
-with the &'kill'& option.
+.new
+Logging started this way may be stopped by using the &'stop'& option.
+The &'kill'& option additionally removes the debug file.
+.wen
Some examples (which depend on variables that don't exist in all
contexts):
.code
4. An event for failing TLS connects to the daemon.
+ 5. Tainted data used for a query-style lookup should be quoted using the
+ expansion item for the lookup type. If not, a warning will be written to
+ the main and panic logs. A future release will enforce this by failing
+ the lookup.
+
+ 6. The ACL "debug" control gains a "stop" option.
+
Version 4.95
------------
{
uschar * debug_tag = NULL;
uschar * debug_opts = NULL;
- BOOL kill = FALSE;
+ BOOL kill = FALSE, stop = FALSE;
while (*p == '/')
{
for (pp += 4; *pp && *pp != '/';) pp++;
kill = TRUE;
}
+ else if (Ustrncmp(pp, "stop", 4) == 0)
+ {
+ for (pp += 4; *pp && *pp != '/';) pp++;
+ stop = TRUE;
+ }
else
while (*pp && *pp != '/') pp++;
p = pp;
}
if (kill)
- debug_logging_stop();
+ debug_logging_stop(TRUE);
+ else if (stop)
+ debug_logging_stop(FALSE);
else
debug_logging_activate(debug_tag, debug_opts);
break;
#endif
extern void debug_logging_activate(uschar *, uschar *);
-extern void debug_logging_stop(void);
+extern void debug_logging_stop(BOOL);
extern void debug_print_argv(const uschar **);
extern void debug_print_ids(uschar *);
extern void debug_printf_indent(const char *, ...) PRINTF_FUNCTION(1,2);
void
-debug_logging_stop(void)
+debug_logging_stop(BOOL kill)
{
if (!debug_file || !debuglog_name[0]) return;
debug_selector = 0;
fclose(debug_file);
debug_file = NULL;
-unlink_log(lt_debug);
+if (kill) unlink_log(lt_debug);
}
/* Called from the appendfile transport setup. */