X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fngircd%2Flog.h;h=529b164044bacf6fc2055c35203205a8c9d024ff;hb=e1de769ab9958f6debbd884a1555de09d1191d32;hp=4729dd808ae301f891ed34a2bcc3255adc4cc32d;hpb=1547f76cfdfabe2226af2e35196316b21a32937c;p=ngircd-alex.git diff --git a/src/ngircd/log.h b/src/ngircd/log.h index 4729dd80..529b1640 100644 --- a/src/ngircd/log.h +++ b/src/ngircd/log.h @@ -2,40 +2,15 @@ * ngIRCd -- The Next Generation IRC Daemon * Copyright (c)2001,2002 by Alexander Barton (alex@barton.de) * - * Dieses Programm ist freie Software. Sie koennen es unter den Bedingungen - * der GNU General Public License (GPL), wie von der Free Software Foundation - * herausgegeben, weitergeben und/oder modifizieren, entweder unter Version 2 - * der Lizenz oder (wenn Sie es wuenschen) jeder spaeteren Version. - * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste - * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS. + * This program 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; either version 2 of the License, or + * (at your option) any later version. + * Please read the file COPYING, README and AUTHORS for more information. * - * $Id: log.h,v 1.7 2002/01/02 02:42:58 alex Exp $ + * $Id: log.h,v 1.20 2006/08/05 09:16:21 fw Exp $ * - * log.h: Logging-Funktionen (Header) - * - * $Log: log.h,v $ - * Revision 1.7 2002/01/02 02:42:58 alex - * - Copyright-Texte aktualisiert. - * - * Revision 1.6 2001/12/31 02:18:51 alex - * - viele neue Befehle (WHOIS, ISON, OPER, DIE, RESTART), - * - neuen Header "defines.h" mit (fast) allen Konstanten. - * - Code Cleanups und viele "kleine" Aenderungen & Bugfixes. - * - * Revision 1.5 2001/12/29 20:16:31 alex - * - Log-Funktionen fuer Resolver-Sub-Prozess implementiert. - * - * Revision 1.4 2001/12/27 01:44:49 alex - * - die Verwendung von syslog kann nun abgeschaltet werden. - * - * Revision 1.3 2001/12/12 23:31:24 alex - * - Zum Loggen wird nun auch syslog verwendet. - * - * Revision 1.2 2001/12/12 17:19:29 alex - * - LOG_ERR heisst nun LOG_ERROR. - * - * Revision 1.1.1.1 2001/12/11 21:53:04 alex - * - Imported sources to CVS. + * Logging functions (header) */ @@ -43,7 +18,7 @@ #define __log_h__ -#ifdef USE_SYSLOG +#ifdef SYSLOG # include #else # define LOG_EMERG 0 @@ -57,15 +32,29 @@ #endif -GLOBAL VOID Log_Init( VOID ); -GLOBAL VOID Log_Exit( VOID ); +#define LOG_snotice 1024 + -GLOBAL VOID Log( CONST INT Level, CONST CHAR *Format, ... ); +GLOBAL void Log_Init PARAMS(( bool Daemon_Mode )); +GLOBAL void Log_Exit PARAMS(( void )); -GLOBAL VOID Log_Init_Resolver( VOID ); -GLOBAL VOID Log_Exit_Resolver( VOID ); +GLOBAL void Log PARAMS(( int Level, const char *Format, ... )); -GLOBAL VOID Log_Resolver( CONST INT Level, CONST CHAR *Format, ... ); +#ifdef DEBUG +GLOBAL void LogDebug PARAMS(( const char *Format, ... )); +#else +static inline void LogDebug PARAMS(( UNUSED const char *Format, ... )){/* Do nothing. The compiler should optimize this out, please ;-) */} +#endif + + +GLOBAL void Log_Init_Resolver PARAMS(( void )); +GLOBAL void Log_Exit_Resolver PARAMS(( void )); + +GLOBAL void Log_Resolver PARAMS(( const int Level, const char *Format, ... )); + +#ifdef DEBUG +GLOBAL void Log_InitErrorfile PARAMS(( void )); +#endif #endif