|
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.
Definition at line 61 of file qLog.c.
|