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'm trying to use plog in my project and I need to use Crontab for scheduled automatic start. Here is my code
time_t t = time(0);
char filename[100];
// The position for log filestrftime(filename, sizeof(filename), "/root/work/Lipschitz-future/iTradeDemo_Linux/log/%Y-%m-%d-%H:%M:%S.log",localtime(&t));
static plog::RollingFileAppender<plog::CsvFormatter> fileAppender(filename, 1000000, 5);
static plog::ConsoleAppender<plog::TxtFormatter> consoleAppender;
// Set 2 appenders to output to console and log file at same timeplog::init(plog::debug, &fileAppender).addAppender(&consoleAppender);
And I use Crontab to start it at a specific time. But the output is just one line (my program should output several lines) and then the program terminated.
Date;Time;Severity;TID;This;Function;Message
2023/02/21;20:01:03.038;INFO;26031;0;main@31;"Version iTapTradeAPI V9.3.2.1, Date 2019.9.17"
Would you please help me how I can use Plog and Crontab together?
The text was updated successfully, but these errors were encountered:
Hi,
I'm trying to use plog in my project and I need to use Crontab for scheduled automatic start. Here is my code
And I use Crontab to start it at a specific time. But the output is just one line (my program should output several lines) and then the program terminated.
Would you please help me how I can use Plog and Crontab together?
The text was updated successfully, but these errors were encountered: