*/
FILE *out;
+ /**
+ * Flush after writing a line?
+ */
+ bool flush_line;
+
/**
* Maximum level to log, for each group
*/
fprintf(this->out, "%.*s\n", (int)(next - current), current);
current = next + 1;
}
+#ifndef HAVE_SETLINEBUF
+ if (this->flush_line)
+ {
+ fflush(this->out);
+ }
+#endif /* !HAVE_SETLINEBUF */
this->mutex->unlock(this->mutex);
this->lock->unlock(this->lock);
}
this->lock->write_lock(this->lock);
close_file(this);
this->out = file;
+ this->flush_line = flush_line;
this->lock->unlock(this->lock);
}