diff options
author | Peter Powell <petpow@saberuk.com> | 2017-02-05 19:05:27 +0000 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2017-02-28 05:19:12 +0000 |
commit | 7c301149883e038a4bf3ce4a7a9a6a91b3e1ce97 (patch) | |
tree | 5e698c3b99e9c3addf516a2dcd7b3b2686fc15cb /include | |
parent | 51ff3d67ed1b6f1594373d3745293ef155a26f44 (diff) |
Allow <log> tags to specify how often logs should be flushed.
Also use the behaviour behind this to fix #1290.
Diffstat (limited to 'include')
-rw-r--r-- | include/logger.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/logger.h b/include/logger.h index c56859a62..5d4a80d9f 100644 --- a/include/logger.h +++ b/include/logger.h @@ -41,14 +41,18 @@ class CoreExport FileWriter */ FILE* log; + /** The number of write operations after which we should flush. + */ + unsigned int flush; + /** Number of write operations that have occured */ - int writeops; + unsigned int writeops; public: /** The constructor takes an already opened logfile. */ - FileWriter(FILE* logfile); + FileWriter(FILE* logfile, unsigned int flushcount); /** Write one or more preformatted log lines. * If the data cannot be written immediately, |