X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fngircd%2Flog.h;h=9fdb8a29adddbde629af3294c8727ed1dcf3bdf6;hb=9cd3494de92eccaa201f42fc8b02fc68c752aca8;hp=ac96f072e0332929de3fa834f2ea7c6650c51728;hpb=20a2ffef88a426c0531eb6d08718e6ca19bdacc8;p=ngircd-alex.git diff --git a/src/ngircd/log.h b/src/ngircd/log.h index ac96f072..9fdb8a29 100644 --- a/src/ngircd/log.h +++ b/src/ngircd/log.h @@ -1,17 +1,14 @@ /* * 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) * - * 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.10 2002/03/27 20:53:31 alex Exp $ - * - * log.h: Logging-Funktionen (Header) + * Logging functions (header) */ @@ -19,7 +16,7 @@ #define __log_h__ -#ifdef USE_SYSLOG +#ifdef SYSLOG # include #else # define LOG_EMERG 0 @@ -36,15 +33,27 @@ #define LOG_snotice 1024 -GLOBAL VOID Log_Init( VOID ); -GLOBAL VOID Log_Exit( 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( INT Level, CONST CHAR *Format, ... ); +GLOBAL void Log_ServerNotice PARAMS((char UserMode, const char *Format, ...)); -GLOBAL VOID Log_Init_Resolver( VOID ); -GLOBAL VOID Log_Exit_Resolver( 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( CONST INT Level, CONST CHAR *Format, ... ); +GLOBAL void Log_Init_Subprocess PARAMS((char *Name)); +GLOBAL void Log_Exit_Subprocess PARAMS((char *Name)); + +GLOBAL void Log_Subprocess PARAMS((const int Level, const char *Format, ...)); + +#ifdef DEBUG +GLOBAL void Log_InitErrorfile PARAMS(( void )); +#endif #endif