1Log::Dispatch::Screen(3U)ser Contributed Perl DocumentatiLoong::Dispatch::Screen(3)
2
3
4
6 Log::Dispatch::Screen - Object for logging to the screen
7
9 version 2.69
10
12 use Log::Dispatch;
13
14 my $log = Log::Dispatch->new(
15 outputs => [
16 [
17 'Screen',
18 min_level => 'debug',
19 stderr => 1,
20 newline => 1
21 ]
22 ],
23 );
24
25 $log->alert("I'm searching the city for sci-fi wasabi");
26
28 This module provides an object for logging to the screen (really
29 "STDOUT" or "STDERR").
30
31 Note that a newline will not be added automatically at the end of a
32 message by default. To do that, pass "newline => 1".
33
34 The handle will be autoflushed, but this module opens it's own handle
35 to fd 1 or 2 instead of using the global "STDOUT" or "STDERR".
36
38 The constructor takes the following parameters in addition to the
39 standard parameters documented in Log::Dispatch::Output:
40
41 · stderr (0 or 1)
42
43 Indicates whether or not logging information should go to "STDERR".
44 If false, logging information is printed to "STDOUT" instead.
45
46 This defaults to true.
47
48 · utf8 (0 or 1)
49
50 If this is true, then the output uses "binmode" to apply the
51 ":encoding(UTF-8)" layer to the relevant handle for output. This
52 will not affect "STDOUT" or "STDERR" in other parts of your code.
53
54 This defaults to false.
55
57 Bugs may be submitted at
58 <https://github.com/houseabsolute/Log-Dispatch/issues>.
59
60 I am also usually active on IRC as 'autarch' on "irc://irc.perl.org".
61
63 The source code repository for Log-Dispatch can be found at
64 <https://github.com/houseabsolute/Log-Dispatch>.
65
67 Dave Rolsky <autarch@urth.org>
68
70 This software is Copyright (c) 2019 by Dave Rolsky.
71
72 This is free software, licensed under:
73
74 The Artistic License 2.0 (GPL Compatible)
75
76 The full text of the license can be found in the LICENSE file included
77 with this distribution.
78
79
80
81perl v5.30.1 2020-01-30 Log::Dispatch::Screen(3)