From fd093d89cf3cb3c494ffbef5dc815f4bc01723b0 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 3 May 2009 14:32:13 +0000 Subject: [PATCH] added timestamp to file, stdout and stderr log messages --- door_daemon/log_targets.h | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/door_daemon/log_targets.h b/door_daemon/log_targets.h index 0ea8e83..5489279 100644 --- a/door_daemon/log_targets.h +++ b/door_daemon/log_targets.h @@ -32,6 +32,27 @@ * along with uAnytun. If not, see . */ +#include + +static char* get_time_formatted() +{ + char* time_string; + time_t t = time(NULL); + if(t < 0) + time_string = "