summaryrefslogtreecommitdiffstats
path: root/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'common.c')
-rw-r--r--common.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/common.c b/common.c
index 8c6060c6..30965c7d 100644
--- a/common.c
+++ b/common.c
@@ -185,6 +185,13 @@ logger(struct dhcpcd_ctx *ctx, int pri, const char *fmt, ...)
if (ctx && ctx->options & (DHCPCD_DUMPLEASE | DHCPCD_TEST))
goto out;
+ if (pri < LOG_DEBUG || (ctx->options & DHCPCD_DEBUG)) {
+ struct timeval tv;
+ if (gettimeofday(&tv, NULL) != -1) {
+ fprintf(stdout, "%ld.%ld:", tv.tv_sec,tv.tv_usec);
+ }
+ }
+
if (ctx && ctx->log_fd != -1) {
if (pri < LOG_DEBUG || (ctx->options & DHCPCD_DEBUG)) {
struct timeval tv;