-
-
12 Jul 2020 13:43:09 UTC
- Distribution: Log-Handler
- Module version: 0.07
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (4)
- Testers (1029 / 0 / 0)
- Kwalitee
Bus factor: 1- 58.41% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (61.08KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Carp
- Data::Dumper
- Fcntl
- File::Spec
- POSIX
- Params::Validate
- Sys::Hostname
- Test::More
- Time::HiRes
- UNIVERSAL
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Log::Handler::Output::Screen - Log messages to the screen.
SYNOPSIS
use Log::Handler::Output::Screen; my $screen = Log::Handler::Output::Screen->new( log_to => "STDERR", dump => 1, ); $screen->log($message);
DESCRIPTION
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)
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.
AUTHOR
Jonny Schulz <jschulz.cpan(at)bloonix.de>.
COPYRIGHT
Copyright (C) 2007-2009 by Jonny Schulz. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install Log::Handler, copy and paste the appropriate command in to your terminal.
cpanm Log::Handler
perl -MCPAN -e shell install Log::Handler
For more information on module installation, please visit the detailed CPAN module installation guide.