aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/sledjchisl/sledjchisl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c
index acf229a..501c7d1 100644
--- a/src/sledjchisl/sledjchisl.c
+++ b/src/sledjchisl/sledjchisl.c
@@ -573,6 +573,7 @@ void logMe(int v, char *format, ...)
573 struct timeval tv; 573 struct timeval tv;
574 time_t curtime; 574 time_t curtime;
575 char date[DATE_TIME_LEN]; 575 char date[DATE_TIME_LEN];
576 char *t;
576 577
577 if ((!VERBOSE) && (4 < v)) 578 if ((!VERBOSE) && (4 < v))
578 return; 579 return;
@@ -593,9 +594,10 @@ void logMe(int v, char *format, ...)
593 gettimeofday(&tv, NULL); 594 gettimeofday(&tv, NULL);
594 curtime = tv.tv_sec; 595 curtime = tv.tv_sec;
595 strftime(date, DATE_TIME_LEN, "(%Z %z) %F %T", localtime(&curtime)); 596 strftime(date, DATE_TIME_LEN, "(%Z %z) %F %T", localtime(&curtime));
596 597 t = xmprintf("%.6d", (int) tv.tv_usec);
597 v *= 2; 598 v *= 2;
598 fprintf(stderr, "%s.%.6ld \e[%sm%-8s sledjchisl: %s\e[0m\n", date, tv.tv_usec, logTypes[v], logTypes[v + 1], ret); 599 fprintf(stderr, "%s.%.2s \e[%sm%-8s %s\e[0m\n", date, t, logTypes[v], logTypes[v + 1], ret);
600 free(t);
599 free(ret); 601 free(ret);
600} 602}
601#define C(...) logMe(0, __VA_ARGS__) 603#define C(...) logMe(0, __VA_ARGS__)