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

  • From: Miika Komu <mkomu@xxxxxxxxx>
  • To: hipl-dev@xxxxxxxxxxxxx
  • Date: Mon, 13 Jun 2011 23:04:34 +0300

Hi,

On 12/06/11 13:50, René Hummen wrote:
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).

I see. A counter answer would be that on an OpenWRT router somebody else might not be using remote syslog and would get the disk full while debugging.

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.

Please check it. I'd be quite happy with this HIPL-specific double debug change if it has a separate flag (let's say "D").

Other related posts: