diff --git a/CHANGELOG.md b/CHANGELOG.md index 996eb517..337005a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ Expected: February 2024 ### Minor features +* Added us resolution to logs via stderr/stdout * New command-line debug mechanism * Separation between subject-area and details * Multiple subject-areas diff --git a/lib/src/clixon_log.c b/lib/src/clixon_log.c index fe5e7ffc..5608e546 100644 --- a/lib/src/clixon_log.c +++ b/lib/src/clixon_log.c @@ -254,9 +254,10 @@ flogtime(FILE *f) gettimeofday(&tv, NULL); localtime_r((time_t*)&tv.tv_sec, &tm); - fprintf(f, "%s %2d %02d:%02d:%02d: ", + fprintf(f, "%s %2d %02d:%02d:%02d.%06d: ", mon2name(tm.tm_mon), tm.tm_mday, - tm.tm_hour, tm.tm_min, tm.tm_sec); + tm.tm_hour, tm.tm_min, tm.tm_sec, + tv.tv_usec); return 0; }