#include "portab.h"
-static char UNUSED id[] = "$Id: log.c,v 1.57.2.1 2005/08/29 11:19:48 alex Exp $";
+static char UNUSED id[] = "$Id: log.c,v 1.57.2.2 2006/02/08 21:23:21 fw Exp $";
#include "imp.h"
#include <assert.h>
#include "log.h"
-LOCAL char Init_Txt[127];
-LOCAL bool Is_Daemon;
+static char Init_Txt[127];
+static bool Is_Daemon;
#ifdef DEBUG
-LOCAL char Error_File[FNAME_LEN];
+static char Error_File[FNAME_LEN];
#endif
-LOCAL void Wall_ServerNotice PARAMS(( char *Msg ));
+static void Wall_ServerNotice PARAMS(( char *Msg ));
GLOBAL void
} /* Log_Exit */
+# ifdef PROTOTYPES
+GLOBAL void
+LogDebug( const char *Format, ... )
+# else
+GLOBAL void
+LogDebug( Format, va_alist )
+const char *Format;
+va_dcl
+# endif
+#ifdef DEBUG
+{
+ char msg[MAX_LOG_MSG_LEN];
+ va_list ap;
+
+ if (!NGIRCd_Debug) return;
+#ifdef PROTOTYPES
+ va_start( ap, Format );
+#else
+ va_start( ap );
+#endif
+ vsnprintf( msg, MAX_LOG_MSG_LEN, Format, ap );
+ va_end( ap );
+ Log(LOG_DEBUG, "%s", msg);
+}
+#else
+{ /* do nothing */ }
+#endif /* DEBUG */
+
+
#ifdef PROTOTYPES
GLOBAL void
Log( int Level, const char *Format, ... )
#endif
{
/* Eintrag in Logfile(s) schreiben */
-
char msg[MAX_LOG_MSG_LEN];
bool snotice;
va_list ap;
* Send log messages to users flagged with the "s" mode.
* @param Msg The message to send.
*/
-LOCAL void
+static void
Wall_ServerNotice( char *Msg )
{
CLIENT *c;
* (at your option) any later version.
* Please read the file COPYING, README and AUTHORS for more information.
*
- * $Id: log.h,v 1.18 2005/06/24 19:55:10 alex Exp $
+ * $Id: log.h,v 1.18.2.1 2006/02/08 21:23:21 fw Exp $
*
* Logging functions (header)
*/
GLOBAL void Log_Exit PARAMS(( void ));
GLOBAL void Log PARAMS(( int Level, const char *Format, ... ));
+GLOBAL void LogDebug PARAMS(( const char *Format, ... ));
GLOBAL void Log_Init_Resolver PARAMS(( void ));
GLOBAL void Log_Exit_Resolver PARAMS(( void ));