From 1ef7503676513a85e80eda0950d0cae8b60d7cdd Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Sat, 26 Jun 2010 00:54:47 +0200 Subject: [PATCH] Log time --- src/forb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/forb.c b/src/forb.c index a7761b6..2b31722 100644 --- a/src/forb.c +++ b/src/forb.c @@ -509,8 +509,11 @@ void forb_ul_log_fnc(ul_log_domain_t *domain, int level, const char *format, va_list ap) { + struct timespec now; if(!(level&UL_LOGL_CONT)) { level&=UL_LOGL_MASK; + clock_gettime(CLOCK_MONOTONIC, &now); + fprintf(forb_ul_log_file,"%ld.%6ld: ", now.tv_sec, now.tv_nsec/1000); if (progname[0]) fprintf(forb_ul_log_file,"%s: ", progname); if(domain && domain->name) -- 2.39.2