Line 0
Link Here
|
|
|
1 |
--- util/log.c.orig 2018-11-22 15:37:33 UTC |
2 |
+++ util/log.c |
3 |
@@ -78,8 +78,6 @@ static const char* ident="unbound"; |
4 |
/** are we using syslog(3) to log to */ |
5 |
static int logging_to_syslog = 0; |
6 |
#endif /* HAVE_SYSLOG_H */ |
7 |
-/** time to print in log, if NULL, use time(2) */ |
8 |
-static time_t* log_now = NULL; |
9 |
/** print time in UTC or in secondsfrom1970 */ |
10 |
static int log_time_asc = 0; |
11 |
|
12 |
@@ -181,11 +179,6 @@ void log_ident_set(const char* id) |
13 |
ident = id; |
14 |
} |
15 |
|
16 |
-void log_set_time(time_t* t) |
17 |
-{ |
18 |
- log_now = t; |
19 |
-} |
20 |
- |
21 |
void log_set_time_asc(int use_asc) |
22 |
{ |
23 |
log_time_asc = use_asc; |
24 |
@@ -255,9 +248,7 @@ log_vmsg(int pri, const char* type, |
25 |
lock_quick_unlock(&log_lock); |
26 |
return; |
27 |
} |
28 |
- if(log_now) |
29 |
- now = (time_t)*log_now; |
30 |
- else now = (time_t)time(NULL); |
31 |
+ now = (time_t)time(NULL); |
32 |
#if defined(HAVE_STRFTIME) && defined(HAVE_LOCALTIME_R) |
33 |
if(log_time_asc && strftime(tmbuf, sizeof(tmbuf), "%b %d %H:%M:%S", |
34 |
localtime_r(&now, &tm))%(sizeof(tmbuf)) != 0) { |