monit-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: duplicate message


From: Jan-Henrik Haukeland
Subject: Re: duplicate message
Date: 17 Dec 2002 22:38:53 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Civil Service)

Martin Pala <address@hidden> writes:

> What about following code:
> 
> (monitor.c:)
> ...
> log("Starting %s daemon\n", prog);
> if(! Run.debug) printf("Starting %s daemon\n", prog);
> ...
> 
> It makes following output in debug mode:
> unicorn:~/cvs/monit.cvs-20021217# ./monit -c /etc/monitrc
> Starting monit daemon
> Starting monit daemon
> Starting httpd at [127.0.0.1:2812]
> 
> There is duplicated "Starting monit daemon" message. I think that we
> discussed it in the past and for some reason we let it in the
> code. After changing error->log i think we can maybe avoid it =>
> remove:
> 
> 
> if(! Run.debug) printf("Starting %s daemon\n", prog);
> 
> because if monit has tty, it will print the message to standard output
> as well.


Yep, yep. I missed it, and probably others as well. I've fixed this
one though and if you see other places where substituing error() with
log() gives meaning, please do :)

-- 
Jan-Henrik Haukeland



reply via email to

[Prev in Thread] Current Thread [Next in Thread]