X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Flogger.h;h=16c32229a5dc50ca842c5988a46ff911eacb88bb;hb=64df216836aa1027aa7d6b7242264a982dc540bc;hp=c56859a62d57691ea20e2eb045c6d5d2798789cb;hpb=f62654a6859998f9d63eb22702c572d5ebcff15c;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/logger.h b/include/logger.h index c56859a62..16c32229a 100644 --- a/include/logger.h +++ b/include/logger.h @@ -1,8 +1,13 @@ /* * InspIRCd -- Internet Relay Chat Daemon * + * Copyright (C) 2014 Attila Molnar + * Copyright (C) 2012-2013, 2017 Sadie Powell + * Copyright (C) 2012, 2019 Robby + * Copyright (C) 2010 Craig Edwards + * Copyright (C) 2009 Daniel De Graaf + * Copyright (C) 2008, 2012 Robin Burchell * Copyright (C) 2008 Thomas Stagner - * Copyright (C) 2008 Robin Burchell * * This file is part of InspIRCd. InspIRCd is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public @@ -41,14 +46,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 +207,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);