X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fngircd%2Flog.h;h=e7e6b616a9e2bad551d56444bbee0178103dcd93;hb=8605e9c0fe7ffa42149271c9af31288bd4a0dfac;hp=bc22c20027ee6bcc40b35bfb60a8aed2ada70c0b;hpb=c7f075236b5930f191e784a69c782e7a9d24bc58;p=ngircd-alex.git diff --git a/src/ngircd/log.h b/src/ngircd/log.h index bc22c200..e7e6b616 100644 --- a/src/ngircd/log.h +++ b/src/ngircd/log.h @@ -1,6 +1,6 @@ /* * ngIRCd -- The Next Generation IRC Daemon - * Copyright (c)2001,2002 by Alexander Barton (alex@barton.de) + * Copyright (c)2001-2010 Alexander Barton (alex@barton.de) * * 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 @@ -8,8 +8,6 @@ * (at your option) any later version. * Please read the file COPYING, README and AUTHORS for more information. * - * $Id: log.h,v 1.13 2002/12/12 12:23:43 alex Exp $ - * * Logging functions (header) */ @@ -18,7 +16,7 @@ #define __log_h__ -#ifdef USE_SYSLOG +#ifdef SYSLOG # include #else # define LOG_EMERG 0 @@ -35,16 +33,27 @@ #define LOG_snotice 1024 -GLOBAL VOID Log_Init PARAMS((VOID )); -GLOBAL VOID Log_Exit PARAMS((VOID )); +GLOBAL void Log_Init PARAMS(( bool Daemon_Mode )); +GLOBAL void Log_Exit PARAMS(( void )); + +GLOBAL void Log PARAMS(( int Level, const char *Format, ... )); -GLOBAL VOID Log_InitErrorfile PARAMS((VOID )); -GLOBAL VOID Log PARAMS((INT Level, CONST CHAR *Format, ... )); +GLOBAL void Log_ServerNotice PARAMS((char UserMode, const char *Format, ...)); -GLOBAL VOID Log_Init_Resolver PARAMS((VOID )); -GLOBAL VOID Log_Exit_Resolver PARAMS((VOID )); +#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_Resolver PARAMS((CONST INT Level, CONST CHAR *Format, ... )); +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