X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Flogger.h;h=c03c84d9a410226e2bb77bc891064abf584c8e56;hb=850b7a3ace862101a944a9332d72b6bd597c17cc;hp=c56859a62d57691ea20e2eb045c6d5d2798789cb;hpb=b9e11915a976daaf790ebc763aff56e19fd49e0f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/logger.h b/include/logger.h index c56859a62..c03c84d9a 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, @@ -198,7 +202,7 @@ class CoreExport LogManager : public fakederef */ bool AddLogType(const std::string &type, LogStream *l, bool autoclose); - /** Removes a logstream from the core. After removal, it will not recieve further events. + /** Removes a logstream from the core. After removal, it will not receive further events. * If the LogStream was ever added with autoclose, it will be closed after this call (this means the pointer won't be valid anymore). */ void DelLogStream(LogStream* l);