The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Tickit::Widget::LogAny - log message rendering

VERSION

version 0.005

SYNOPSIS

 #!/usr/bin/env perl
 use strict;
 use warnings;
 
 use Tickit;
 use Tickit::Widget::LogAny;
 use Log::Any qw($log);
 
 my $tickit = Tickit->new(
        root => Tickit::Widget::LogAny->new(
                stderr => 1,
        )
 );
 print STDERR "print to STDERR\n";
 printf STDERR "printf(...) to %s", 'STDERR';
 warn "a warning\n";
 warn "a warning with no \\n";
 $log->trace('trace message');
 $log->info('info message');
 $log->debug('debug message');
 $log->notice('notice message');
 $log->warn('warn message');
 $log->error('error message');
 $log->critical('critical message');
 $tickit->run;

DESCRIPTION

Provides basic log rendering, with optional warn / STDERR capture.

Basic rendering:

Log::Any output displayed in Tickit widget

Stack trace popup:

Log message with stack trace popup display using Tickit desktop layout

Activating any line in the list of log messages (typically by pressing Enter) will show the stack trace for that entry. Use the OK button to close (typically by pressing Tab, then Enter).

METHODS

new

Takes the following named parameters:

  • warn - if true, will install a handler for warn()

  • stderr - if true, will install a handler for all STDERR output

  • scroll - if true (default), will attempt to scroll the window on new entries

  • max_entries - will limit the number of entries we'll store, default is 5000, set to 0 for no limit

SEE ALSO

INHERITED METHODS

Tickit::ContainerWidget

add, child_opts, child_resized, children_changed, find_child, focus_next, remove, set_child_opts, window_lost

Tickit::Widget

get_style_pen, get_style_text, get_style_values, key_focus_next_after, key_focus_next_before, parent, pen, redraw, requested_cols, requested_lines, requested_size, reshape, resized, set_parent, set_requested_size, set_style, set_style_tag, set_window, style_classes, take_focus, window

AUTHOR

Tom Molesworth <TEAM@cpan.org>

LICENSE

Copyright Tom Molesworth 2014-2015. Licensed under the same terms as Perl itself.