Copyright (c) 2001 Matthias Kramm <kramm@quiss.org>
- This file is distributed under the GPL, see file COPYING for details */
+ 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.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#ifdef __NT__
#include "stdafx.h"
#include "log.h"
-static int screenloglevel = 1;
+int screenloglevel = 1;
static int fileloglevel = -1;
static int socketloglevel = -1;
static int maxloglevel = 1;
static char * logimportance[]= {"Fatal","Error","Warning","Notice","Verbose","Debug"};
static int loglevels=6;
static char * logimportance2[]= {" ","FATAL ","ERROR ","WARNING","NOTICE ","VERBOSE","DEBUG "};
-void log(char* logString)
+static inline void log(char* logString)
{
char timebuffer[32];
char* logBuffer;
free (logBuffer);
}
-void logf(const char* format, ...)
+void msg(const char* format, ...)
{
char buf[1024];
va_list arglist;
/* speed up hack */
if(format[0]=='<') {
char*z = "fewnvd";
- char*x = strchr(z,format[0]);
+ char*x = strchr(z,format[1]);
if(x && (x-z)>maxloglevel)
return;
}