Marc Haber <[EMAIL PROTECTED]> (Di 05 Feb 2008 11:46:15 CET):
> On Wed, Nov 28, 2007 at 04:05:53PM +0100, Heiko Schlittermann wrote:
> > The logtail utility fails in using some alternative offset file
> > (passed via the '-o' option).
> 
> Please give an example how to reproduce the issue.

Hm. I can't. It seems to work:

    logtail -f <LOGFILE> -o <OFFSET>        # works (according man page)

.. as documented. I think last time I supposed it should work that way
too:

    logtail -o <OFFSET> <LOGFILE>           # doesn't work (doesn't fit
                                              to manpage)

    logtail <LOGFILE>                       # works (but doesn't fit to manpage)
                                            # but of course, no
                                            # alternative offset file



So there is some inconsistency between the tool and the manpage.

Since I believe the last invocation is naturally, the last but one
should work too, shouldn't it? The first invocation is the only valid
(at least according to the man page)

And according to the source following works too:

    logtail <LOGFILE> <OFFSET>



I'll attach 2 diffs, both seem(!) to work for me. But I didn't touch the
man page so far.


    Best regards from Dresden
    Viele Grüße aus Dresden
    Heiko Schlittermann
-- 
 SCHLITTERMANN.de ---------------------------- internet & unix support -
 Heiko Schlittermann HS12-RIPE -----------------------------------------
 gnupg encrypted messages are welcome - key ID: 48D0359B ---------------
 gnupg fingerprint: 3061 CFBF 2D88 F034 E8D2  7E92 EE4E AC98 48D0 359B -
32,42c32,34
< # try to detect plain logtail invocation without switches
< if (!$opts{f} && $#ARGV != 0 && $#ARGV != 1) {
<    print STDERR "No logfile to read. Use -f [LOGFILE].\n";
<    exit 66;
< } elsif ($#ARGV == 0) {
<    $logfile = $ARGV[0];
< } elsif ($#ARGV == 1) {
<    ($logfile, $offsetfile) = ($ARGV[0], $ARGV[1]);
< } else {
<    ($logfile, $offsetfile) = ($opts{f}, $opts{o});
< }
---
> ($logfile, $offsetfile) = @ARGV;
> $logfile = $opts{f} if defined $opts{f};
> $offsetfile = $opts{o} if defined $opts{o};
40,41d39
< } else {
<    ($logfile, $offsetfile) = ($opts{f}, $opts{o});
42a41,42
> $logfile = $opts{f} if defined $opts{f};
> $offsetfile = $opts{o} if defined $opts{o};

Attachment: signature.asc
Description: Digital signature

Reply via email to