Q_LOG* qLogOpen ( const char *  logbase,
const char *  filenameformat,
int  rotateinterval,
bool  flush 
)

Open ratating-log file

Parameters:
logbase log directory
filenameformat filename format. formatting argument is same as strftime()
rotateinterval rotating interval seconds
flush set to true if you want to flush everytime logging. false for buffered logging
Returns:
a pointer of Q_LOG structure
Note:
rotateinterval is not relative time. If you set it to 3600, log file will be rotated at every hour. And filenameformat is same as strftime(). So If you want to log with hourly rotating, filenameformat must be defined at least hourly format, such like "xxx-%Y%m%d%H.log". You can set it to "xxx-%H.log" for daily overwriting.
   Q_LOG *log = qLogOpen("/tmp", "qdecoder-%Y%m%d.err", 86400, false);
   qLogClose(log);

Definition at line 61 of file qLog.c.


Generated on Mon Mar 26 07:00:51 2018 for JSOC_Documentation by  doxygen 1.5.7.1