Codebase list liblog-dispatchouli-perl / dc69eed
Update upstream source from tag 'upstream/2.022' Update to upstream version '2.022' with Debian dir fad0d6e1a5ca139d6d44e0416326c10f3a73717b gregor herrmann 3 years ago
10 changed file(s) with 50 addition(s) and 35 deletion(s). Raw diff Collapse all Expand all
00 Revision history for Log-Dispatchouli
1
2 2.022 2020-08-24 13:50:15-04:00 America/New_York
3 - don't duplicate pid in syslog!
14
25 2.021 2020-08-12 11:48:57-04:00 America/New_York
36 - add another experimental means to replace how Syslog output is set up
7878 "web" : "https://github.com/rjbs/Log-Dispatchouli"
7979 }
8080 },
81 "version" : "2.021",
81 "version" : "2.022",
8282 "x_Dist_Zilla" : {
8383 "perl" : {
8484 "version" : "5.032000"
264264 {
265265 "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs",
266266 "name" : "@RJBS/Test::ReportPrereqs",
267 "version" : "0.027"
267 "version" : "0.028"
268268 },
269269 {
270270 "class" : "Dist::Zilla::Plugin::Prereqs",
450450 "branch" : null,
451451 "changelog" : "Changes",
452452 "signed" : 0,
453 "tag" : "2.021",
453 "tag" : "2.022",
454454 "tag_format" : "%v",
455455 "tag_message" : "v%V"
456456 },
577577 "Olivier Mengu\u00e9 <dolmen@cpan.org>",
578578 "Randy Stauner <randy@magnificent-tears.com>",
579579 "Ricardo Signes <rjbs@semiotic.systems>",
580 "Ricardo Signes <rjbs@users.noreply.github.com>",
580581 "Sawyer X <xsawyerx@cpan.org>"
581582 ],
582583 "x_generated_by_perl" : "v5.32.0",
583 "x_serialization_backend" : "Cpanel::JSON::XS version 4.19",
584 "x_serialization_backend" : "Cpanel::JSON::XS version 4.20",
584585 "x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later"
585586 }
586587
4242 bugtracker: https://github.com/rjbs/Log-Dispatchouli/issues
4343 homepage: https://github.com/rjbs/Log-Dispatchouli
4444 repository: https://github.com/rjbs/Log-Dispatchouli.git
45 version: '2.021'
45 version: '2.022'
4646 x_Dist_Zilla:
4747 perl:
4848 version: '5.032000'
189189 -
190190 class: Dist::Zilla::Plugin::Test::ReportPrereqs
191191 name: '@RJBS/Test::ReportPrereqs'
192 version: '0.027'
192 version: '0.028'
193193 -
194194 class: Dist::Zilla::Plugin::Prereqs
195195 config:
332332 branch: ~
333333 changelog: Changes
334334 signed: 0
335 tag: '2.021'
335 tag: '2.022'
336336 tag_format: '%v'
337337 tag_message: v%V
338338 Dist::Zilla::Role::Git::Repo:
429429 - 'Olivier Mengué <dolmen@cpan.org>'
430430 - 'Randy Stauner <randy@magnificent-tears.com>'
431431 - 'Ricardo Signes <rjbs@semiotic.systems>'
432 - 'Ricardo Signes <rjbs@users.noreply.github.com>'
432433 - 'Sawyer X <xsawyerx@cpan.org>'
433434 x_generated_by_perl: v5.32.0
434435 x_serialization_backend: 'YAML::Tiny version 1.73'
4444 "base" => 0,
4545 "lib" => 0
4646 },
47 "VERSION" => "2.021",
47 "VERSION" => "2.022",
4848 "test" => {
4949 "TESTS" => "t/*.t"
5050 }
00 This archive contains the distribution Log-Dispatchouli,
1 version 2.021:
1 version 2.022:
22
33 a simple wrapper around Log::Dispatch
44
11 use warnings;
22 package Log::Dispatchouli::Global;
33 # ABSTRACT: a system for sharing a global, dynamically-scoped logger
4 $Log::Dispatchouli::Global::VERSION = '2.021';
4 $Log::Dispatchouli::Global::VERSION = '2.022';
55 use Carp ();
66 use Log::Dispatchouli;
77 use Scalar::Util ();
279279
280280 =head1 VERSION
281281
282 version 2.021
282 version 2.022
283283
284284 =head1 DESCRIPTION
285285
11 use warnings;
22 package Log::Dispatchouli::Proxy;
33 # ABSTRACT: a simple wrapper around Log::Dispatch
4 $Log::Dispatchouli::Proxy::VERSION = '2.021';
4 $Log::Dispatchouli::Proxy::VERSION = '2.022';
55 use Params::Util qw(_ARRAY0 _HASH0);
66
77 #pod =head1 DESCRIPTION
148148
149149 =head1 VERSION
150150
151 version 2.021
151 version 2.022
152152
153153 =head1 DESCRIPTION
154154
11 use warnings;
22 package Log::Dispatchouli;
33 # ABSTRACT: a simple wrapper around Log::Dispatch
4 $Log::Dispatchouli::VERSION = '2.021';
4 $Log::Dispatchouli::VERSION = '2.022';
55 use Carp ();
66 use File::Spec ();
77 use Log::Dispatch;
146146 : ('stderr');
147147 };
148148
149 my $pid_prefix = exists $arg->{log_pid} ? $arg->{log_pid} : 1;
150
151 my $log = Log::Dispatch->new(
152 $pid_prefix
153 ? (
154 callbacks => sub {
155 "[$$] ". {@_}->{message}
156 },
157 )
158 : ()
159 );
160
161 my $self = bless { dispatcher => $log } => $class;
149 my $log = Log::Dispatch->new;
150 my $self = bless {
151 dispatcher => $log,
152 log_pid => (exists $arg->{log_pid} ? $arg->{log_pid} : 1),
153 } => $class;
162154
163155 if ($arg->{to_file}) {
164156 require Log::Dispatch::File;
182174 mode => 'append',
183175 callbacks => do {
184176 if (my $format = $arg->{file_format}) {
185 sub { $format->({@_}->{message}) }
177 sub {
178 my $message = {@_}->{message};
179 $message = "[$$] $message" if $self->{log_pid};
180 $format->($message)
181 };
186182 } else {
187183 # The time format returned here is subject to change. -- rjbs,
188184 # 2008-11-21
189 sub { (localtime) . ' ' . {@_}->{message} . "\n" }
185 sub {
186 my $message = {@_}->{message};
187 $message = "[$$] $message" if $self->{log_pid};
188 (localtime) . " $message\n";
189 };
190190 }
191191 },
192192 )
209209 name => 'self',
210210 min_level => 'debug',
211211 array => $self->{events},
212 ($self->{log_pid} ? (callbacks => sub { "[$$] ". {@_}->{message} })
213 : ())
212214 ),
213215 );
214216 }
239241 my $name = "std$dest";
240242 my $code = sub {
241243 return if $_[0]->dispatcher->output($name);
244
245 my $callback = $_[0]->{log_pid} ? sub { "[$$] " . ({@_}->{message}) . "\n" }
246 : sub { ({@_}->{message}) . "\n" };
247
242248 $_[0]->dispatcher->add(
243249 $_[0]->stdio_dispatcher_class->new(
244250 name => "std$dest",
245251 min_level => 'debug',
246252 stderr => ($dest eq 'err' ? 1 : 0),
247 callbacks => sub { +{@_}->{message} . "\n" },
253 callbacks => $callback,
248254 ($_[0]{quiet_fatal}{"std$dest"} ? (max_level => 'info') : ()),
249255 ),
250256 );
264270 min_level => 'debug',
265271 facility => $arg{facility},
266272 ident => $arg{ident},
267 logopt => 'pid',
273 logopt => ($self->{log_pid} ? 'pid' : ''),
268274 socket => $arg{socket} || 'native',
269275 callbacks => sub {
270276 ( my $m = {@_}->{message} ) =~ s/\n/<LF>/g;
732738
733739 =head1 VERSION
734740
735 version 2.021
741 version 2.022
736742
737743 =head1 SYNOPSIS
738744
11291135
11301136 =item *
11311137
1138 Ricardo Signes <rjbs@users.noreply.github.com>
1139
1140 =item *
1141
11321142 Sawyer X <xsawyerx@cpan.org>
11331143
11341144 =back
22 use strict;
33 use warnings;
44
5 # This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.027
5 # This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.028
66
77 use Test::More tests => 1;
88
187187 );
188188 }
189189
190 pass;
190 pass('Reported prereqs');
191191
192192 # vim: ts=4 sts=4 sw=4 et:
11
22 note 'Checking Changes';
33 my $changes_file = 'Changes';
4 my $newver = '2.021';
4 my $newver = '2.022';
55 my $trial_token = '-TRIAL';
66 my $encoding = 'UTF-8';
77