1Appender::Screen(3) User Contributed Perl Documentation Appender::Screen(3)
2
3
4
6 Log::Log4perl::Appender::Screen - Log to STDOUT/STDERR
7
9 use Log::Log4perl::Appender::Screen;
10
11 my $app = Log::Log4perl::Appender::Screen->new(
12 stderr => 0,
13 utf8 => 1,
14 );
15
16 $file->log(message => "Log me\n");
17
19 This is a simple appender for writing to STDOUT or STDERR.
20
21 The constructor "new()" take an optional parameter "stderr", if set to
22 a true value, the appender will log to STDERR. The default setting for
23 "stderr" is 1, so messages will be logged to STDERR by default.
24
25 If "stderr" is set to a false value, it will log to STDOUT (or, more
26 accurately, whichever file handle is selected via "select()", STDOUT by
27 default).
28
29 Design and implementation of this module has been greatly inspired by
30 Dave Rolsky's "Log::Dispatch" appender framework.
31
32 To enable printing wide utf8 characters, set the utf8 option to a true
33 value:
34
35 my $app = Log::Log4perl::Appender::Screen->new(
36 stderr => 1,
37 utf8 => 1,
38 );
39
40 This will issue the necessary binmode command to the selected output
41 channel (stderr/stdout).
42
44 Copyright 2002-2013 by Mike Schilli <m@perlmeister.com> and Kevin Goess
45 <cpan@goess.org>.
46
47 This library is free software; you can redistribute it and/or modify it
48 under the same terms as Perl itself.
49
51 Please contribute patches to the project on Github:
52
53 http://github.com/mschilli/log4perl
54
55 Send bug reports or requests for enhancements to the authors via our
56
57 MAILING LIST (questions, bug reports, suggestions/patches):
58 log4perl-devel@lists.sourceforge.net
59
60 Authors (please contact them via the list above, not directly): Mike
61 Schilli <m@perlmeister.com>, Kevin Goess <cpan@goess.org>
62
63 Contributors (in alphabetical order): Ateeq Altaf, Cory Bennett, Jens
64 Berthold, Jeremy Bopp, Hutton Davidson, Chris R. Donnelly, Matisse
65 Enzer, Hugh Esco, Anthony Foiani, James FitzGibbon, Carl Franks, Dennis
66 Gregorovic, Andy Grundman, Paul Harrington, Alexander Hartmaier David
67 Hull, Robert Jacobson, Jason Kohles, Jeff Macdonald, Markus Peter,
68 Brett Rann, Peter Rabbitson, Erik Selberg, Aaron Straup Cope, Lars
69 Thegler, David Viner, Mac Yang.
70
71
72
73perl v5.32.0 2020-09-07 Appender::Screen(3)