Skip to content

Commit

Permalink
Merge branch 'github-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
JJL772 committed Sep 19, 2019
2 parents 660bc20 + bfccdad commit c64690b
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions ek9000App/src/devEK9000.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,12 @@ void Info(const char* fmt, ...)
}

void Warning(const char* fmt, ...)
{
time_t clk = time(0);
tm _tm;
epicsTime_localtime(&clk, &_tm);
epicsPrintf("%i/%i/%i %i:%i:%i [WARN] ", _tm.tm_mday, _tm.tm_mon, _tm.tm_year, _tm.tm_hour, _tm.tm_min, _tm.tm_sec);
{
epicsTimeStamp stmp;
epicsTimeGetCurrent(&stmp);
char txt[40];
epicsTimeToStrftime(txt, 40, "%Y/%m/%d %H:%M:%S.%03f ", &stmp);
epicsPrintf("%s", txt);
va_list list;
va_start(list, fmt);
epicsVprintf(fmt, list);
Expand All @@ -147,10 +148,11 @@ void Warning(const char* fmt, ...)

void Error(const char* fmt, ...)
{
time_t clk = time(0);
tm _tm;
epicsTime_localtime(&clk, &_tm);
epicsPrintf("%i/%i/%i %i:%i:%i [ERROR] ", _tm.tm_mday, _tm.tm_mon, _tm.tm_year, _tm.tm_hour, _tm.tm_min, _tm.tm_sec);
epicsTimeStamp stmp;
epicsTimeGetCurrent(&stmp);
char txt[40];
epicsTimeToStrftime(txt, 40, "%Y/%m/%d %H:%M:%S.%03f ", &stmp);
epicsPrintf("%s", txt);
va_list list;
va_start(list, fmt);
epicsVprintf(fmt, list);
Expand Down

0 comments on commit c64690b

Please sign in to comment.