X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Flogger.h;h=6af842b791b11384150c7677baac24b601a199be;hb=635cb9d65f6d7f6758ae8ed874da00c8d94b6e39;hp=c56859a62d57691ea20e2eb045c6d5d2798789cb;hpb=6fe1f4e1136f2ab95a88e68af1894bf6002d03f4;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/logger.h b/include/logger.h index c56859a62..6af842b79 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; - /** Number of write operations that have occured + /** The number of write operations after which we should flush. */ - int writeops; + unsigned int flush; + + /** Number of write operations that have occurred + */ + 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, @@ -117,7 +126,7 @@ typedef std::map FileLogMap; class CoreExport LogManager : public fakederef { private: - /** Lock variable, set to true when a log is in progress, which prevents further loggging from happening and creating a loop. + /** Lock variable, set to true when a log is in progress, which prevents further logging from happening and creating a loop. */ bool Logging; @@ -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);