Log::Handler::Output::Screen(3pm)

Log::Handler::Output::Screen3pm

Log messages to the screen.

Usage

    use Log::Handler::Output::Screen;
    my $screen = Log::Handler::Output::Screen->new(
        log_to => "STDERR",
        dump   => 1,
    );
    $screen->log($message);

Overview

This output module makes it possible to log messages to your screen.

Methods

new()

Call "new()" to create a new Log::Handler::Output::Screen object.

The following options are possible:

log_to

Where do you want to log? Possible is: STDOUT, STDERR and WARN.

WARN means to call "warn()".

The default is STDOUT.

dump

Set this option to 1 if you want that the message will be dumped with "Data::Dumper" to the screen.

utf8, utf-8

Set utf8 or utf-8 on STDOUT or STDERR. It depends on the parameter log_to.

    utf8   =  binmode, $fh, ":utf8";
    utf-8  =  binmode, $fh, "encoding(utf-8)";

Yes, there is a difference.

<http://perldoc.perl.org/perldiag.html#Malformed-UTF-8-character-(%25s)>

<http://perldoc.perl.org/Encode.html#UTF-8-vs.-utf8-vs.-UTF8>

log()

Call "log()" if you want to log a message to the screen.

Example:

    $screen->log("this message goes to the screen");

validate()

Validate a configuration.

reload()

Reload with a new configuration.

errstr()

This function returns the last error message.

Prerequisites

    Data::Dumper
    Params::Validate

Exports

No exports.

Report bugs

Please report all bugs to <jschulz.cpan(at)bloonix.de>.

If you send me a mail then add Log::Handler into the subject.

Releases

9 releases since Debian 5.0 (Lenny); the text changed 6 times.

  1. 5.0
  2. 6.0
  3. 7
  4. 8
  5. 9–10
  6. 11
  7. 12–13

Author

Jonny Schulz <jschulz.cpan(at)bloonix.de>.

From liblog-handler-perl 0.90-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.