The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Flux::Log::In - input stream for Flux::Log storage.

VERSION

version 1.00

SYNOPSIS

    $in = $log_storage->in({ unrotate => { log => "/var/log/my.log", pos => "/tmp/pos" } });

    $line = $in->read; # read next line from log

    $lag = $in->lag; # get log lag in bytes

    $in->commit; # commit current position
    # or:
    $position = $in->position; # remember position
    ... # read more lines
    $in->commit($position); # commit saved position to cursor, ignoring all other lines

METHODS

position()

Get current position.

You can commit this stream later using this position instead of position at the moment of commit.

lag()

Get log lag in bytes.

commit()
commit($position)

Commit position in stream's cursor.

SEE ALSO

Flux::Log - output stream for writing logs.

Flux::In - role for all input streams.

Log::Unrotate - module for reading rotated logs.

AUTHOR

Vyacheslav Matyukhin <me@berekuk.ru>

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by Yandex LLC.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.