inn2: innfeed silently dies when logfile reaches 2G

Julien ÉLIE julien at trigofacile.com
Fri Aug 24 11:39:03 UTC 2007


En réponse à Alexander Bartolich :
>>     grep "log-file" ~/etc/innfeed.conf | sed 's/\s//g' | sed 's/.*:\(.*\)#.*/\1/'
>
> Is that \s in the first sed supposed to work as in perl?

It was intended to...
But well, not every sed implementation understands that.


> But then I prefer the awk solution
>
> awk '$1 == "log-file:" { print $2 }' ~/etc/innfeed.conf

You're right.  It is better to use awk (I always forget it; I am unfortunately
too used to quick and dirty grep/sed patterns).

Well, to correctly parse innfeed.conf, we will need that:

awk '{gsub(/:|#/, " & ")} {if ($1 == "log-file" && $2 == ":") print $3}' ~/etc/innfeed.conf


Indeed, it should match:

    log-file : innfeed.log
    log-file:innfeed.log#in <pathlog>


By the way, I have just noticed that there is work to do on innfeed/innfeed.conf
documentation because when I see for the explanation of "log-file" that it is
generated if "debug-value" is set and that the pathname is relative to
"backlog-directory", I am a little scared...  [It is "debug-level" and "pathlog".]
I dared not look at the explanation of other parameters :-)
The problem affects the documentation of both STABLE and CURRENT.

I will have a look at it after the documentation for scanlogs and maybe other
documentation for programs related to logs handling (there is not much doc on them).

Sorry for the delay about tackling controlchan for checkgroups messages but I believe
it is of a higher priority to deal with that.

-- 
Julien ÉLIE

« Victoris causa diis placuit, sed uicta Catoni. » (Lucain) 



More information about the inn-workers mailing list