Skip to content

Commit

Permalink
always enable write to output file
Browse files Browse the repository at this point in the history
  • Loading branch information
oguyon committed Feb 16, 2024
1 parent 28594a3 commit 06f9362
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions src/CommandLineInterface/fps/fps_outlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,32 +89,32 @@ errno_t functionparameter_outlog_file(
{
//get_FLAG_FPSOUTLOG();

if ( FLAG_FPSOUTLOG )
{
// Get GMT time
struct timespec tnow;
time_t now;

clock_gettime(CLOCK_MILK, &tnow);
now = tnow.tv_sec;
struct tm *uttime;
uttime = gmtime(&now);

char timestring[TIMESTRINGLEN];
SNPRINTF_CHECK(timestring,
TIMESTRINGLEN,
"%04d-%02d-%02dT%02d:%02d:%02d.%09ld",
1900 + uttime->tm_year,
1 + uttime->tm_mon,
uttime->tm_mday,
uttime->tm_hour,
uttime->tm_min,
uttime->tm_sec,
tnow.tv_nsec);

fprintf(fpout, "%s %ld.%09ld %-12s %s\n", timestring, tnow.tv_sec, tnow.tv_nsec, keyw, msgstring);
fflush(fpout);
}
//if ( FLAG_FPSOUTLOG )
//{
// Get GMT time
struct timespec tnow;
time_t now;

clock_gettime(CLOCK_MILK, &tnow);
now = tnow.tv_sec;
struct tm *uttime;
uttime = gmtime(&now);

char timestring[TIMESTRINGLEN];
SNPRINTF_CHECK(timestring,
TIMESTRINGLEN,
"%04d-%02d-%02dT%02d:%02d:%02d.%09ld",
1900 + uttime->tm_year,
1 + uttime->tm_mon,
uttime->tm_mday,
uttime->tm_hour,
uttime->tm_min,
uttime->tm_sec,
tnow.tv_nsec);

fprintf(fpout, "%s %ld.%09ld %-12s %s\n", timestring, tnow.tv_sec, tnow.tv_nsec, keyw, msgstring);
fflush(fpout);
//}

return RETURN_SUCCESS;
}
Expand Down

0 comments on commit 06f9362

Please sign in to comment.