[hipl-dev] Re: [Merge] lp:~fahad-aizaz/hipl/logging into lp:hipl

  • From: René Hummen <rene.hummen@xxxxxxxxxxxxxxxxx>
  • To: hipl-dev@xxxxxxxxxxxxx
  • Date: Sun, 12 Jun 2011 12:50:50 +0200

On 10.06.2011, at 15:07, Miika Komu wrote:
> On 06/10/2011 02:34 PM, René Hummen wrote:
>> On 09.06.2011, at 19:41, Miika Komu wrote:
>>> Review: Needs Information
>>>> If the HIP daemon is executed in the foreground mode then in that case all 
>>>> the messages are
>>>> logged both on STDERR and SYSLOG.
>>> 
>>> I don't see why somebody would want to do this? I mean if you run it on the 
>>> foreground, then I would expect everything to happen on the foreground. If 
>>> grepping is needed, then normal shell redirection and pipes tricks apply. 
>>> Can you find some other daemon software that does this?
>> 
>> This decision was made for three reasons:
> 
> By whom and where? The activities are dominated by Aachen but I thought we 
> were a community.

It was my decision and I didn't mean to ignore the opinion of others. Yes, we 
are a community where everybody can propose patches and where everybody can 
voice his concerns. In my opinion, that is the point of having merge proposals: 
Everybody can suggest his implementation for merge, whereas the community 
decides which changes will be merged to trunk. I don't intend to push changes 
to trunk where someone expresses serious concerns.

>> 1) syslog allows to redirect logs to a remote host. This should also apply 
>> when HIPL is started in foreground.
> 
> Why?

Because I don't see any negative side-effects of using syslog in foreground as 
well and because I sometimes ran hipd in foreground, noticed a bug, and then 
had to copy paste the output to a file. Syslog in foreground seems beneficial 
to me in this case, especially when using remote logging (e.g., for OpenWRT 
routers).

> Let me reask the unanswered question above: is there any other daemon-based 
> software that does this?

Honestly, I did not check. If you give me a good reason why we shouldn't do it 
the syslog way, I'm more than happy to printf only in foreground (save for the 
pending results in (2)).

> The foreground mode in background daemons is usually for foreground 
> diagnostics. If you want to see syslog, you start in background. Is there 
> some rationale for deviating from this (what makes HIPL so special)?

(See above)

>> 2) syslog outputs messages asynchronously. So once HIPL has triggered 
>> output, it doesn't need to wait until it's displayed or written to file.
> 
> Asynchronous output -> no blocking? I failed to understand this.

I'll make some test regarding (2) and get back to you on that one.

Ciao,
René




--
Dipl.-Inform. Rene Hummen, Ph.D. Student
Chair of Communication and Distributed Systems
RWTH Aachen University, Germany
tel: +49 241 80 20772
web: http://www.comsys.rwth-aachen.de/team/rene-hummen/

Other related posts: