Package: postfix-gld
Version: 1.7-9
X-Debbugs-Cc: sa...@gasmi.net,sanv...@debian.org

Hello.

By looking at the output of journalctl, I've noticed that this
message is shown in red:

gld[1664]: gld started, up and running

This happens because the message is logged with LOG_ALERT,
which I believe it's too much for a simple startup message,
as the system admin might think there is something wrong
when it's really not the case.

I've compared the output of "journalctl -p 5" and "journalctl -p 6",
in my machine and I see that most services use LOG_INFO for that,
and only very few (anacron, for example), use LOG_NOTICE.

So I believe LOG_INFO would be appropriate for this.

The attached patch (which just copies ErrorLog to InfoLog and changes
the priority) works for me, and I will probably apply it to the Debian
package. However, LOG_NOTICE would be also an option, and I would prefer
not to patch the Debian package if you decide to use LOG_NOTICE instead.

(Using X-Debbugs-Cc to reach the author).

Thanks.
--- a/cnf.c
+++ b/cnf.c
@@ -123,6 +123,15 @@ closelog();
 #endif
 }
 
+void InfoLog(config *conf,char *msg)
+{
+#ifdef HAVE_SYSLOG_H
+openlog("gld",0,conf->facility);
+syslog(LOG_INFO,"%s",msg);
+closelog();
+#endif
+}
+
 int ReadClients(config *conf,char *str)
 {
 char *ptr,*x,*y;
--- a/gld.h
+++ b/gld.h
@@ -84,6 +84,7 @@ long SQLQuery(char *q);
 int GreyList(char *ip,char *sender,char *recipient,config *conf);
 void Log(config *conf,char * recipient,char *sender,char *ip,int white);
 void ErrorLog(config *conf,char *msg);
+void InfoLog(config *conf,char *msg);
 void Reload(int s);
 void ShowBaseInfo(void);
 void Quote(char *str);
--- a/server.c
+++ b/server.c
@@ -154,7 +154,7 @@ if(srv.sd==-1)
 
 if(conf.debug==1) printf("bind to port %d succesful\n",conf.port);
 
-if(conf.syslog==1) ErrorLog(&conf,"gld started, up and running");
+if(conf.syslog==1) InfoLog(&conf,"gld started, up and running");
 if(conf.debug==0) MyDaemon(0,0);
 if(conf.debug==1) printf("Waiting for incoming connexions\n");
 

Reply via email to