\r
static void *privData;\r
static logCallback callback;\r
+static time_t start;\r
\r
void log_setCallback(logCallback c, void *p)\r
{\r
if (debug_level >= LOG_DEBUG)\r
{\r
/* print with count and time information */\r
- fprintf(log_output, "%s %d %ld %s:%d %s(): %s\n", log_strings[level+1], count, time(NULL), file, line, function, buffer);\r
+ time_t t=time(NULL)-start;\r
+ fprintf(log_output, "%s %d %ld %s:%d %s(): %s\n", log_strings[level+1], count, t, file, line, function, buffer);\r
}\r
else\r
{\r
\r
int log_register_commands(struct command_context_s *cmd_ctx)\r
{\r
+ start = time(NULL);\r
register_command(cmd_ctx, NULL, "log_output", handle_log_output_command,\r
COMMAND_ANY, "redirect logging to <file> (default: stderr)");\r
register_command(cmd_ctx, NULL, "debug_level", handle_debug_level_command,\r