You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i did this for my own tracking purpose and here is the code:
#include<ctime>
std::time_tresult=std::time(nullptr);
char*time=std::asctime(std::localtime(&result));
time[strlen(time)-1] ='\0'; // get rid of new line added in asctimeif (programOptions.output_type==OutputType::text) {
std::cout << "TIME=" << time << std::endl;
} elseif (programOptions.output_type==OutputType::json) {
std::cout << "\"time\":\"" << time << "\",";
}
feel free to use it, if it is good enough for you :)
hi,
any chance to get a timestamp in the json log output?
The text was updated successfully, but these errors were encountered: