small fixes
This commit is contained in:
parent
a46399e651
commit
6043f8e453
5
SYSLOG
5
SYSLOG
@ -1,10 +1,9 @@
|
|||||||
Now binkleyforce supports logging to syslog (see syslogd(8) for
|
Now binkleyforce supports logging to syslog (see syslogd(8) for
|
||||||
details)
|
details)
|
||||||
|
|
||||||
It uses LOG_UUCP facility, LOG_PID option. LOG_ERR and LOG_NOTICE
|
You can define facility; LOG_PID option, LOG_ERR and LOG_NOTICE
|
||||||
levels are used.
|
levels are used.
|
||||||
|
|
||||||
To enable it, uncomment line 19 in source/include/logger.h
|
To enable it, add -DUSE_SYSLOG to CFLAGS in Makefile
|
||||||
( /* #define USE_SYSLOG */ )
|
|
||||||
|
|
||||||
TODO: add option to ``configure'' script
|
TODO: add option to ``configure'' script
|
5
TODO
5
TODO
@ -7,5 +7,8 @@
|
|||||||
smart means (1) write time stat for every line and (2) evenly
|
smart means (1) write time stat for every line and (2) evenly
|
||||||
select a line to make a call
|
select a line to make a call
|
||||||
+ add bind_ip option
|
+ add bind_ip option
|
||||||
- fix Exec feature
|
- fix Exec features
|
||||||
+ add to ``configure'' --with-syslog key
|
+ add to ``configure'' --with-syslog key
|
||||||
|
- fix reread configs with kill -1
|
||||||
|
- fix debug
|
||||||
|
- fix domains support
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
INCLUDES = -I./include
|
INCLUDES = -I./include
|
||||||
CFLAGS = -g -O2
|
CFLAGS = -g -O2 -DUSE_SYSLOG
|
||||||
LIBS =
|
LIBS =
|
||||||
YACC = bison -y
|
YACC = bison -y
|
||||||
INSTALL = /usr/bin/install -c
|
INSTALL = /usr/bin/install -c
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
* binkleyforce -- unix FTN mailer project
|
* binkleyforce -- unix FTN mailer project
|
||||||
*
|
*
|
||||||
* Copyright (c) 1998-2000 Alexander Belkin, 2:5020/1398.11
|
* Copyright (c) 1998-2000 Alexander Belkin, 2:5020/1398.11
|
||||||
|
* Copyright (c) 2004 Evgeniy Kozhuhovskiy, 2:450/256
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -64,7 +65,7 @@ struct debuglevel {
|
|||||||
|
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
|
|
||||||
#endif /* ifdef USE_SYSLOG */
|
#endif /* USE_SYSLOG */
|
||||||
|
|
||||||
#ifndef USE_SYSLOG
|
#ifndef USE_SYSLOG
|
||||||
const char *log_getfilename(int whatfor)
|
const char *log_getfilename(int whatfor)
|
||||||
@ -177,13 +178,6 @@ int log_reopen(const char *logname, const char *ext, const char *tty)
|
|||||||
return log_open(logname, ext, tty);
|
return log_open(logname, ext, tty);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* void log_setident(const char *ident)
|
|
||||||
{
|
|
||||||
if( ident )
|
|
||||||
strnxcpy(log_ident, ident, sizeof(log_ident));
|
|
||||||
else
|
|
||||||
*log_ident = '\0';
|
|
||||||
} */
|
|
||||||
|
|
||||||
int log(const char *s, ...)
|
int log(const char *s, ...)
|
||||||
|
|
||||||
@ -297,7 +291,7 @@ int logerr(const char *s, ...)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* ifndef USE_SYSLOG */
|
#endif /* USE_SYSLOG */
|
||||||
|
|
||||||
|
|
||||||
#ifdef USE_SYSLOG
|
#ifdef USE_SYSLOG
|
||||||
@ -363,13 +357,6 @@ int log(const char *s, ...)
|
|||||||
else
|
else
|
||||||
fprintf(log_priority, "%s [%d] ", timestr, mypid);
|
fprintf(log_priority, "%s [%d] ", timestr, mypid);
|
||||||
|
|
||||||
|
|
||||||
/* vsyslog(log_priority, s, args);*/
|
|
||||||
/* putc('\n', log_fp);
|
|
||||||
fflush(log_fp);
|
|
||||||
|
|
||||||
} */
|
|
||||||
|
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -390,28 +377,14 @@ int logerr(const char *s, ...)
|
|||||||
|
|
||||||
int mypid = getpid();
|
int mypid = getpid();
|
||||||
|
|
||||||
/* if( log_ident[0] && log_ttyname[0] )
|
|
||||||
syslog(log_priority, "%s %s.%s[%d] ", timestr, log_ident, log_ttyname, mypid);
|
|
||||||
else if( log_ident[0] )
|
|
||||||
syslog(log_priority, "%s %s[%d] ", timestr, log_ident, mypid);
|
|
||||||
else if( log_ttyname[0] )
|
|
||||||
fprintf(log_priority, "%s %s[%d] ", timestr, log_ttyname, mypid);
|
|
||||||
else
|
|
||||||
fprintf(log_priority, "%s [%d] ", timestr, mypid);
|
|
||||||
*/
|
|
||||||
|
|
||||||
vsyslog(log_priority, s, args);
|
vsyslog(log_priority, s, args);
|
||||||
/* putc('\n', log_fp);
|
|
||||||
fflush(log_fp);
|
|
||||||
|
|
||||||
} */
|
|
||||||
|
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* ifdef USE_SYSLOG */
|
#endif /* USE_SYSLOG */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -530,7 +503,7 @@ int debug_close(void)
|
|||||||
if( debug_fp )
|
if( debug_fp )
|
||||||
{
|
{
|
||||||
fprintf(debug_fp, "****************************************************\n");
|
fprintf(debug_fp, "****************************************************\n");
|
||||||
fprintf(debug_fp, " Closing Binkley-Force debug file at %s\n",
|
fprintf(debug_fp, " Closing binkleyforce debug file at %s\n",
|
||||||
time_string_long(buf, sizeof(buf), 0));
|
time_string_long(buf, sizeof(buf), 0));
|
||||||
fprintf(debug_fp, "****************************************************\n");
|
fprintf(debug_fp, "****************************************************\n");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user