masqmail

changeset 395:5f0829f8e6c7

Removed log_max_pri limit. It makes no sense.
author markus schnalke <meillo@marmaro.de>
date Sat, 18 Feb 2012 19:39:11 +0100
parents c8e3d1a79313
children 6f2a8113a79e
files src/conf.c src/log.c src/masqmail.h
diffstat 3 files changed, 11 insertions(+), 13 deletions(-) [+]
line diff
     1.1 --- a/src/conf.c	Sat Feb 18 19:32:40 2012 +0100
     1.2 +++ b/src/conf.c	Sat Feb 18 19:39:11 2012 +0100
     1.3 @@ -396,7 +396,6 @@
     1.4  	gchar lval[256], rval[2048];
     1.5  	GList *listen_addrs_tmp = NULL;
     1.6  
     1.7 -	conf.log_max_pri = 7;
     1.8  	conf.do_relay = TRUE;
     1.9  	conf.localpartcmp = strcmp;
    1.10  	conf.max_defer_time = 86400 * 4;  /* 4 days */
     2.1 --- a/src/log.c	Sat Feb 18 19:32:40 2012 +0100
     2.2 +++ b/src/log.c	Sat Feb 18 19:39:11 2012 +0100
     2.3 @@ -125,20 +125,20 @@
     2.4  	if (!pri) {
     2.5  		return;
     2.6  	}
     2.7 -	if (conf.use_syslog)
     2.8 +	if (conf.use_syslog) {
     2.9  		vsyslog(pri, fmt, args);
    2.10 -	else if (pri <= conf.log_max_pri) {
    2.11 -		FILE *file = logfile ? logfile : stderr;
    2.12 -		time_t now = time(NULL);
    2.13 -		struct tm *t = localtime(&now);
    2.14 -		gchar buf[24];
    2.15 +		return;
    2.16 +	}
    2.17 +	FILE *file = logfile ? logfile : stderr;
    2.18 +	time_t now = time(NULL);
    2.19 +	struct tm *t = localtime(&now);
    2.20 +	gchar buf[24];
    2.21  
    2.22 -		strftime(buf, 24, "%Y-%m-%d %H:%M:%S", t);
    2.23 -		fprintf(file, "%s [%d] ", buf, getpid());
    2.24 +	strftime(buf, 24, "%Y-%m-%d %H:%M:%S", t);
    2.25 +	fprintf(file, "%s [%d] ", buf, getpid());
    2.26  
    2.27 -		vfprintf(file, fmt, args);
    2.28 -		fflush(file);
    2.29 -	}
    2.30 +	vfprintf(file, fmt, args);
    2.31 +	fflush(file);
    2.32  }
    2.33  
    2.34  #ifdef ENABLE_DEBUG
     3.1 --- a/src/masqmail.h	Sat Feb 18 19:32:40 2012 +0100
     3.2 +++ b/src/masqmail.h	Sat Feb 18 19:39:11 2012 +0100
     3.3 @@ -129,7 +129,6 @@
     3.4  
     3.5  	gint debug_level;
     3.6  	gboolean use_syslog;
     3.7 -	guint log_max_pri;
     3.8  
     3.9  	gchar *host_name;
    3.10  	GList *local_hosts;