lundi 28 mai 2018

Read & write log on specific time interval c++

I want to write to log file with timestamp. The timestamp should represent the time interval from beginning of the application like below:

1: This log message arrived after 1s of starting the application

5: This log message arrived after 5s of starting the application

Then i want to read the log message in that exact time interval. Like after 1s i will read the first message then when 5s is passed i will read the second message.

Is there any library by which i can do that? I have found some library like easyloggingcpp which can save log file using timestamp. But the timestamp is the corresponding time. Also i have not found any way how to read the message on specific time interval.

Is there any way i can do it?

Aucun commentaire:

Enregistrer un commentaire