Mojolicious::Plugin::Webtail - display tail to your browser
use Mojolicious::Lite; plugin( 'Webtail', file => "/path/to/logfile", webtailrc => '/path/to/webtail.rc' ); app->start; or > perl -Mojo -e 'a->plugin("Webtail", file => "/path/to/logfile", webtailrc => "/path/to/webtail.rc")->start' daemon or > tail -f /path/to/logfile | perl -Mojo -e 'a->plugin("Webtail", webtailrc => "/path/to/webtail.rc")->start' daemon and access "http://host:port/webtail" in your web browser.
Mojolicious::Plugin::Webtail is display tail to your browser by WebSocket.
Mojolicious::Plugin::Webtail inherits all methods from Mojolicious::Plugin.
Mojolicious::Plugin::Webtail supports the following options.
file
displays the contents of file or, by default, its STDIN.
STDIN
webtailrc
define your custom callback in webtail file.
webtail
the code in webtail file is executed when a new line is inserted.
tail_opts
define tail options.
default: '-f -n 0'
hayajo <hayajo@cpan.org>
https://github.com/r7kamura/webtail
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Mojolicious::Plugin::Webtail, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Plugin::Webtail
CPAN shell
perl -MCPAN -e shell install Mojolicious::Plugin::Webtail
For more information on module installation, please visit the detailed CPAN module installation guide.