X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Flog.h;h=529b164044bacf6fc2055c35203205a8c9d024ff;hp=2b6622b9eabe0c86c12a8d33be79c40bf7a05f6c;hb=3243d9ee441e9cd4338965bac7c2ed3b49a3c2dd;hpb=f4ade537d550b872b7e86e6ffce940dfbad4c60c diff --git a/src/ngircd/log.h b/src/ngircd/log.h index 2b6622b9..529b1640 100644 --- a/src/ngircd/log.h +++ b/src/ngircd/log.h @@ -1,22 +1,16 @@ /* * ngIRCd -- The Next Generation IRC Daemon - * Copyright (c)2001 by Alexander Barton (alex@barton.de) + * 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 comBase 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.1 2001/12/11 21:53:04 alex Exp $ - * - * log.h: Logging-Funktionen (Header) - * - * $Log: log.h,v $ - * Revision 1.1 2001/12/11 21:53:04 alex - * Initial revision + * $Id: log.h,v 1.20 2006/08/05 09:16:21 fw Exp $ * + * Logging functions (header) */ @@ -24,17 +18,43 @@ #define __log_h__ -#define LOG_DEBUG 4 -#define LOG_INFO 3 -#define LOG_WARN 2 -#define LOG_ERR 1 -#define LOG_FATAL 0 +#ifdef SYSLOG +# include +#else +# define LOG_EMERG 0 +# define LOG_ALERT 1 +# define LOG_CRIT 2 +# define LOG_ERR 3 +# define LOG_WARNING 4 +# define LOG_NOTICE 5 +# define LOG_INFO 6 +# define LOG_DEBUG 7 +#endif + + +#define LOG_snotice 1024 + +GLOBAL void Log_Init PARAMS(( bool Daemon_Mode )); +GLOBAL void Log_Exit PARAMS(( void )); -GLOBAL VOID Log_Init( VOID ); -GLOBAL VOID Log_Exit( VOID ); +GLOBAL void Log PARAMS(( int Level, const char *Format, ... )); -GLOBAL VOID Log( 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