NAME

Test::LogFile - Wrapper module for testing shared logfile

SYNOPSIS

use Test::LogFile;

my $file = log_file;

my $pid = fork();
if ($pid == 0) {
  # run any worker
}
elsif ($pid) {
  # wait for worker
  sleep 2;
  # testing
  count_ok(
    file  => $file,
    str   => "any text for searching in logfile",
    count => 1, # count that appear str arg in logfile
    hook  => sub {
        my $line = shift;
        # other test when hitting str arg
    }
  );
}

DESCRIPTION

Test::LogFile is testing with shared logfile.

This module aim testing worker, server, and any daemonize program with log output.

AUTHOR

Koji Takiguchi <kojiel {at} gmail.com>

LICENSE

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