Changed the log() function to log_message().
This commit is contained in:
parent
627c88c736
commit
f89272be35
@ -1,4 +1,4 @@
|
|||||||
/* $Id: log.c,v 1.3 2000-09-21 16:53:51 rjkaes Exp $
|
/* $Id: log.c,v 1.4 2001-05-27 02:26:11 rjkaes Exp $
|
||||||
*
|
*
|
||||||
* Logs the various messages which tinyproxy produces to either a log file or
|
* Logs the various messages which tinyproxy produces to either a log file or
|
||||||
* the syslog daemon. Not much to it...
|
* the syslog daemon. Not much to it...
|
||||||
@ -40,7 +40,7 @@ static char *syslog_level[] = {
|
|||||||
/*
|
/*
|
||||||
* This routine logs messages to either the log file or the syslog function.
|
* This routine logs messages to either the log file or the syslog function.
|
||||||
*/
|
*/
|
||||||
void log(short int level, char *fmt, ...)
|
void log_message(short int level, char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
time_t nowtime;
|
time_t nowtime;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $Id: log.h,v 1.3 2000-09-21 16:53:51 rjkaes Exp $
|
/* $Id: log.h,v 1.4 2001-05-27 02:26:11 rjkaes Exp $
|
||||||
*
|
*
|
||||||
* See 'log.c' for a detailed description.
|
* See 'log.c' for a detailed description.
|
||||||
*
|
*
|
||||||
@ -82,13 +82,13 @@
|
|||||||
* DEBUG2("There was a big problem: %s in connptr %p", "hello", connptr);
|
* DEBUG2("There was a big problem: %s in connptr %p", "hello", connptr);
|
||||||
*/
|
*/
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
# define DEBUG1(x) log(LOG_DEBUG, "[%s:%d] " x, __FILE__, __LINE__)
|
# define DEBUG1(x) log_message(LOG_DEBUG, "[%s:%d] " x, __FILE__, __LINE__)
|
||||||
# define DEBUG2(x, y...) log(LOG_DEBUG, "[%s:%d] " x, __FILE__, __LINE__, ## y)
|
# define DEBUG2(x, y...) log_message(LOG_DEBUG, "[%s:%d] " x, __FILE__, __LINE__, ## y)
|
||||||
#else
|
#else
|
||||||
# define DEBUG1(x) do { } while(0)
|
# define DEBUG1(x) do { } while(0)
|
||||||
# define DEBUG2(x, y...) do { } while(0)
|
# define DEBUG2(x, y...) do { } while(0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern void log(short int level, char *fmt, ...);
|
extern void log_message(short int level, char *fmt, ...);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user