Added us resolution to logs via stderr/stdout

This commit is contained in:
Olof hagsand 2024-02-19 12:37:21 +01:00
parent b551e9e5c7
commit a8773fad82
2 changed files with 4 additions and 2 deletions

View file

@ -13,6 +13,7 @@ Expected: February 2024
### Minor features ### Minor features
* Added us resolution to logs via stderr/stdout
* New command-line debug mechanism * New command-line debug mechanism
* Separation between subject-area and details * Separation between subject-area and details
* Multiple subject-areas * Multiple subject-areas

View file

@ -254,9 +254,10 @@ flogtime(FILE *f)
gettimeofday(&tv, NULL); gettimeofday(&tv, NULL);
localtime_r((time_t*)&tv.tv_sec, &tm); 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, 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; return 0;
} }