X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Flogger.h;h=d6bd07498d35df79bf5fae6b3d287553ff523ad7;hb=3d8ec5dbd9cfde34fcbc63ad7b9b1369866f0a33;hp=384e38c1a7c022aabcf4fdf8b7407aad15d71a90;hpb=814eff85327ef682808e0f49d4e18487867d2538;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/logger.h b/include/logger.h index 384e38c1a..d6bd07498 100644 --- a/include/logger.h +++ b/include/logger.h @@ -2,8 +2,8 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2008 InspIRCd Development Team - * See: http://www.inspircd.org/wiki/index.php/Credits + * InspIRCd: (C) 2002-2009 InspIRCd Development Team + * See: http://wiki.inspircd.org/Credits * * This program is free but copyrighted software; see * the file COPYING for details. @@ -38,10 +38,6 @@ class CoreExport FileWriter : public EventHandler */ FILE* log; - /** Buffer of pending log lines to be written - */ - std::string buffer; - /** Number of write operations that have occured */ int writeops; @@ -51,10 +47,6 @@ class CoreExport FileWriter : public EventHandler */ FileWriter(InspIRCd* Instance, FILE* logfile); - /** This returns false, logfiles are writeable. - */ - virtual bool Readable(); - /** Handle pending write events. * This will flush any waiting data to disk. * If any data remains after the fprintf call, @@ -77,7 +69,6 @@ class CoreExport FileWriter : public EventHandler virtual void Close(); /** Close the log file and cancel any events. - * (indirectly call Close() */ virtual ~FileWriter(); }; @@ -170,6 +161,12 @@ class CoreExport LogManager : public classbase Logging = false; } + ~LogManager() + { + if (noforkstream) + delete noforkstream; + } + /** Sets up the logstream for -nofork. Called by InspIRCd::OpenLog() and LogManager::OpenFileLogs(). * First time called it creates the nofork stream and stores it in noforkstream. Each call thereafter just readds it to GlobalLogStreams * and updates the loglevel.