X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Flogger.h;h=0fa4bc7cd029ce7374b3548128c61276d767089f;hb=808a0a09577009c2d6e494979c2189426b332aef;hp=0e1bab4a3968c0c2317843e1e1dac2ca9a26ab54;hpb=cd712c40e1b352c05e7ae0f72e0a5e84cdf64323;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/logger.h b/include/logger.h index 0e1bab4a3..0fa4bc7cd 100644 --- a/include/logger.h +++ b/include/logger.h @@ -1,30 +1,27 @@ -/* +------------------------------------+ - * | Inspire Internet Relay Chat Daemon | - * +------------------------------------+ +/* + * InspIRCd -- Internet Relay Chat Daemon + * + * Copyright (C) 2008 Thomas Stagner + * Copyright (C) 2008 Robin Burchell * - * InspIRCd: (C) 2002-2010 InspIRCd Development Team - * See: http://wiki.inspircd.org/Credits + * 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 + * License as published by the Free Software Foundation, version 2. * - * This program is free but copyrighted software; see - * the file COPYING for details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. * - * --------------------------------------------------- + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ -#ifndef __LOGMANAGER_H -#define __LOGMANAGER_H - -/** This class implements a nonblocking writer. - * Most people writing an ircd give little thought to their disk - * i/o. On a congested system, disk writes can block for long - * periods of time (e.g. if the system is busy and/or swapping - * a lot). If we just use a blocking fprintf() call, this could - * block for undesirable amounts of time (half of a second through - * to whole seconds). We DO NOT want this, so we make our logfile - * nonblocking and hook it into the SocketEngine. - * NB: If the operating system does not support nonblocking file - * I/O (linux seems to, as does freebsd) this will default to - * blocking behaviour. + +#ifndef LOGGER_H +#define LOGGER_H + +/** Simple wrapper providing periodic flushing to a disk-backed file. */ class CoreExport FileWriter { @@ -163,7 +160,7 @@ class CoreExport LogManager } } - /** Opens all logfiles defined in the configuration file using . + /** Opens all logfiles defined in the configuration file using \. */ void OpenFileLogs(); @@ -210,7 +207,7 @@ class CoreExport LogManager /** Logs an event, sending it to all LogStreams registered for the type. * @param type Log message type (ex: "USERINPUT", "MODULE", ...) * @param loglevel Log message level (DEBUG, VERBOSE, DEFAULT, SPARSE, NONE) - * @param msg The format of the message to be logged. See your C manual on printf() for details. + * @param fmt The format of the message to be logged. See your C manual on printf() for details. */ void Log(const std::string &type, int loglevel, const char *fmt, ...) CUSTOM_PRINTF(4, 5); };