aboutsummaryrefslogtreecommitdiffstats
path: root/src/log.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/log.c')
-rw-r--r--src/log.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/log.c b/src/log.c
index d8d9896..864af34 100644
--- a/src/log.c
+++ b/src/log.c
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
/*
* $Log$
+ * Revision 1.9 2008/03/03 06:20:14 james
+ * *** empty log message ***
+ *
* Revision 1.8 2008/03/03 06:04:42 james
* *** empty log message ***
*
@@ -76,8 +79,12 @@ flog_log (Log * _l, char *buf)
fputc ('\n', l->fp);
fflush (l->fp);
- if (l->rotate)
- rotate_check (l->filename);
+ if (l->rotate && rotate_check (l->filename))
+ {
+ fclose (l->fp);
+ rotate (l->filename);
+ l->fp = fopen (l->filename, "a+");
+ }
}