{
va_list ap;
+ // if optional debug mode specified, limit debug output accordingly
+ if (options.debug_mode != NULL &&
+ !strEqual(options.debug_mode, mode))
+ return;
+
va_start(ap, format);
Log(LOG_DEBUG, mode, format, ap);
va_end(ap);
options.execute_command = NULL;
options.special_flags = NULL;
+ options.debug_mode = NULL;
options.mytapes = FALSE;
options.serveronly = FALSE;
else if (strncmp(option, "-debug", option_len) == 0)
{
options.debug = TRUE;
+
+ // optionally, debug output can be limited to a specific debug mode
+ if (option_arg != next_option)
+ options.debug_mode = getStringCopy(option_arg);
}
else if (strncmp(option, "-verbose", option_len) == 0)
{
" --serveronly only start network server\n"
" -v, --verbose verbose mode\n"
" -V, --version show program version\n"
- " --debug display debugging information\n"
+ " --debug[=MODE] show (and limit) debug output\n"
" -e, --execute COMMAND execute batch COMMAND\n"
"\n"
"Valid commands for '--execute' option:\n"