* I/O (linux seems to, as does freebsd) this will default to
* blocking behaviour.
*/
-class CoreExport FileWriter : public EventHandler
+class CoreExport FileWriter
{
protected:
/** The log file (fd is inside this somewhere,
*/
FileWriter(FILE* logfile);
- /** Handle pending write events.
- * This will flush any waiting data to disk.
- * If any data remains after the fprintf call,
- * another write event is scheduled to write
- * the rest of the data when possible.
- */
- virtual void HandleEvent(EventType et, int errornum = 0);
-
/** Write one or more preformatted log lines.
* If the data cannot be written immediately,
* this class will insert itself into the
*/
void WriteLogLine(const std::string &line);
- /** Close the log file and cancel any events.
- */
- virtual void Close();
-
/** Close the log file and cancel any events.
*/
virtual ~FileWriter();
*/
bool Logging;
- /** LogStream for -nofork, logs to STDOUT when it's active.
- */
- LogStream* noforkstream;
-
/** Map of active log types and what LogStreams will receive them.
*/
std::map<std::string, std::vector<LogStream *> > LogStreams;
LogManager();
~LogManager();
- /** 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.
- */
- void SetupNoFork();
-
/** Adds a FileWriter instance to LogManager, or increments the reference count of an existing instance.
* Used for file-stream sharing for FileLogStreams.
*/