233 |
|
|
234 |
|
|
235 |
/* |
/* |
236 |
* Prepares the log entry to be saved through continues calls, and writes it |
* Prepares the log entry to be saved through continues calls, and writes it to |
237 |
* to logfile. |
* logfile. |
238 |
*/ |
*/ |
239 |
void |
void |
240 |
log_info(int flag, void *ptr) |
log_info(int flag, void *ptr) |
259 |
fprintf(logfp, "%s %s %s %s %s%s %s\n", log_time(), |
fprintf(logfp, "%s %s %s %s %s%s %s\n", log_time(), |
260 |
inf.account, inf.mbox, inf.filter, |
inf.account, inf.mbox, inf.filter, |
261 |
(*inf.action == ACTION_DELETE ? "delete" : |
(*inf.action == ACTION_DELETE ? "delete" : |
262 |
*inf.action == ACTION_COPY ? "copy" : |
*inf.action == ACTION_COPY ? "copy" : |
263 |
*inf.action == ACTION_MOVE ? "move" : |
*inf.action == ACTION_MOVE ? "move" : |
264 |
*inf.action == ACTION_RCOPY ? "rcopy " : |
*inf.action == ACTION_RCOPY ? "rcopy " : |
265 |
*inf.action == ACTION_RMOVE ? "rmove " : |
*inf.action == ACTION_RMOVE ? "rmove " : |
266 |
*inf.action == ACTION_FLAG_ADD || |
*inf.action == ACTION_FLAG_ADD || |
267 |
*inf.action == ACTION_FLAG_REMOVE || |
*inf.action == ACTION_FLAG_REMOVE || |
268 |
*inf.action == ACTION_FLAG_REPLACE ? "flag" : |
*inf.action == ACTION_FLAG_REPLACE ? "flag" : |
269 |
*inf.action == ACTION_LIST ? "list" : |
*inf.action == ACTION_LIST ? "list" : |
270 |
"unknown "), |
"unknown "), |
271 |
(inf.destaccount == NULL ? "" : inf.destaccount), |
(inf.destaccount == NULL ? "" : inf.destaccount), |
272 |
(*inf.destmbox == '\0' ? "" : inf.destmbox)); |
(*inf.destmbox == '\0' ? "" : inf.destmbox)); |
273 |
fflush(logfp); |
fflush(logfp); |