Update upstream source from tag 'upstream/2.022'
Update to upstream version '2.022'
with Debian dir fad0d6e1a5ca139d6d44e0416326c10f3a73717b
gregor herrmann
3 years ago
0 | 0 | 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! | |
1 | 4 | |
2 | 5 | 2.021 2020-08-12 11:48:57-04:00 America/New_York |
3 | 6 | - add another experimental means to replace how Syslog output is set up |
78 | 78 | "web" : "https://github.com/rjbs/Log-Dispatchouli" |
79 | 79 | } |
80 | 80 | }, |
81 | "version" : "2.021", | |
81 | "version" : "2.022", | |
82 | 82 | "x_Dist_Zilla" : { |
83 | 83 | "perl" : { |
84 | 84 | "version" : "5.032000" |
264 | 264 | { |
265 | 265 | "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs", |
266 | 266 | "name" : "@RJBS/Test::ReportPrereqs", |
267 | "version" : "0.027" | |
267 | "version" : "0.028" | |
268 | 268 | }, |
269 | 269 | { |
270 | 270 | "class" : "Dist::Zilla::Plugin::Prereqs", |
450 | 450 | "branch" : null, |
451 | 451 | "changelog" : "Changes", |
452 | 452 | "signed" : 0, |
453 | "tag" : "2.021", | |
453 | "tag" : "2.022", | |
454 | 454 | "tag_format" : "%v", |
455 | 455 | "tag_message" : "v%V" |
456 | 456 | }, |
577 | 577 | "Olivier Mengu\u00e9 <dolmen@cpan.org>", |
578 | 578 | "Randy Stauner <randy@magnificent-tears.com>", |
579 | 579 | "Ricardo Signes <rjbs@semiotic.systems>", |
580 | "Ricardo Signes <rjbs@users.noreply.github.com>", | |
580 | 581 | "Sawyer X <xsawyerx@cpan.org>" |
581 | 582 | ], |
582 | 583 | "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", | |
584 | 585 | "x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later" |
585 | 586 | } |
586 | 587 |
42 | 42 | bugtracker: https://github.com/rjbs/Log-Dispatchouli/issues |
43 | 43 | homepage: https://github.com/rjbs/Log-Dispatchouli |
44 | 44 | repository: https://github.com/rjbs/Log-Dispatchouli.git |
45 | version: '2.021' | |
45 | version: '2.022' | |
46 | 46 | x_Dist_Zilla: |
47 | 47 | perl: |
48 | 48 | version: '5.032000' |
189 | 189 | - |
190 | 190 | class: Dist::Zilla::Plugin::Test::ReportPrereqs |
191 | 191 | name: '@RJBS/Test::ReportPrereqs' |
192 | version: '0.027' | |
192 | version: '0.028' | |
193 | 193 | - |
194 | 194 | class: Dist::Zilla::Plugin::Prereqs |
195 | 195 | config: |
332 | 332 | branch: ~ |
333 | 333 | changelog: Changes |
334 | 334 | signed: 0 |
335 | tag: '2.021' | |
335 | tag: '2.022' | |
336 | 336 | tag_format: '%v' |
337 | 337 | tag_message: v%V |
338 | 338 | Dist::Zilla::Role::Git::Repo: |
429 | 429 | - 'Olivier Mengué <dolmen@cpan.org>' |
430 | 430 | - 'Randy Stauner <randy@magnificent-tears.com>' |
431 | 431 | - 'Ricardo Signes <rjbs@semiotic.systems>' |
432 | - 'Ricardo Signes <rjbs@users.noreply.github.com>' | |
432 | 433 | - 'Sawyer X <xsawyerx@cpan.org>' |
433 | 434 | x_generated_by_perl: v5.32.0 |
434 | 435 | x_serialization_backend: 'YAML::Tiny version 1.73' |
44 | 44 | "base" => 0, |
45 | 45 | "lib" => 0 |
46 | 46 | }, |
47 | "VERSION" => "2.021", | |
47 | "VERSION" => "2.022", | |
48 | 48 | "test" => { |
49 | 49 | "TESTS" => "t/*.t" |
50 | 50 | } |
0 | 0 | This archive contains the distribution Log-Dispatchouli, |
1 | version 2.021: | |
1 | version 2.022: | |
2 | 2 | |
3 | 3 | a simple wrapper around Log::Dispatch |
4 | 4 |
1 | 1 | use warnings; |
2 | 2 | package Log::Dispatchouli::Global; |
3 | 3 | # ABSTRACT: a system for sharing a global, dynamically-scoped logger |
4 | $Log::Dispatchouli::Global::VERSION = '2.021'; | |
4 | $Log::Dispatchouli::Global::VERSION = '2.022'; | |
5 | 5 | use Carp (); |
6 | 6 | use Log::Dispatchouli; |
7 | 7 | use Scalar::Util (); |
279 | 279 | |
280 | 280 | =head1 VERSION |
281 | 281 | |
282 | version 2.021 | |
282 | version 2.022 | |
283 | 283 | |
284 | 284 | =head1 DESCRIPTION |
285 | 285 |
1 | 1 | use warnings; |
2 | 2 | package Log::Dispatchouli::Proxy; |
3 | 3 | # ABSTRACT: a simple wrapper around Log::Dispatch |
4 | $Log::Dispatchouli::Proxy::VERSION = '2.021'; | |
4 | $Log::Dispatchouli::Proxy::VERSION = '2.022'; | |
5 | 5 | use Params::Util qw(_ARRAY0 _HASH0); |
6 | 6 | |
7 | 7 | #pod =head1 DESCRIPTION |
148 | 148 | |
149 | 149 | =head1 VERSION |
150 | 150 | |
151 | version 2.021 | |
151 | version 2.022 | |
152 | 152 | |
153 | 153 | =head1 DESCRIPTION |
154 | 154 |
1 | 1 | use warnings; |
2 | 2 | package Log::Dispatchouli; |
3 | 3 | # ABSTRACT: a simple wrapper around Log::Dispatch |
4 | $Log::Dispatchouli::VERSION = '2.021'; | |
4 | $Log::Dispatchouli::VERSION = '2.022'; | |
5 | 5 | use Carp (); |
6 | 6 | use File::Spec (); |
7 | 7 | use Log::Dispatch; |
146 | 146 | : ('stderr'); |
147 | 147 | }; |
148 | 148 | |
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; | |
162 | 154 | |
163 | 155 | if ($arg->{to_file}) { |
164 | 156 | require Log::Dispatch::File; |
182 | 174 | mode => 'append', |
183 | 175 | callbacks => do { |
184 | 176 | 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 | }; | |
186 | 182 | } else { |
187 | 183 | # The time format returned here is subject to change. -- rjbs, |
188 | 184 | # 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 | }; | |
190 | 190 | } |
191 | 191 | }, |
192 | 192 | ) |
209 | 209 | name => 'self', |
210 | 210 | min_level => 'debug', |
211 | 211 | array => $self->{events}, |
212 | ($self->{log_pid} ? (callbacks => sub { "[$$] ". {@_}->{message} }) | |
213 | : ()) | |
212 | 214 | ), |
213 | 215 | ); |
214 | 216 | } |
239 | 241 | my $name = "std$dest"; |
240 | 242 | my $code = sub { |
241 | 243 | return if $_[0]->dispatcher->output($name); |
244 | ||
245 | my $callback = $_[0]->{log_pid} ? sub { "[$$] " . ({@_}->{message}) . "\n" } | |
246 | : sub { ({@_}->{message}) . "\n" }; | |
247 | ||
242 | 248 | $_[0]->dispatcher->add( |
243 | 249 | $_[0]->stdio_dispatcher_class->new( |
244 | 250 | name => "std$dest", |
245 | 251 | min_level => 'debug', |
246 | 252 | stderr => ($dest eq 'err' ? 1 : 0), |
247 | callbacks => sub { +{@_}->{message} . "\n" }, | |
253 | callbacks => $callback, | |
248 | 254 | ($_[0]{quiet_fatal}{"std$dest"} ? (max_level => 'info') : ()), |
249 | 255 | ), |
250 | 256 | ); |
264 | 270 | min_level => 'debug', |
265 | 271 | facility => $arg{facility}, |
266 | 272 | ident => $arg{ident}, |
267 | logopt => 'pid', | |
273 | logopt => ($self->{log_pid} ? 'pid' : ''), | |
268 | 274 | socket => $arg{socket} || 'native', |
269 | 275 | callbacks => sub { |
270 | 276 | ( my $m = {@_}->{message} ) =~ s/\n/<LF>/g; |
732 | 738 | |
733 | 739 | =head1 VERSION |
734 | 740 | |
735 | version 2.021 | |
741 | version 2.022 | |
736 | 742 | |
737 | 743 | =head1 SYNOPSIS |
738 | 744 | |
1129 | 1135 | |
1130 | 1136 | =item * |
1131 | 1137 | |
1138 | Ricardo Signes <rjbs@users.noreply.github.com> | |
1139 | ||
1140 | =item * | |
1141 | ||
1132 | 1142 | Sawyer X <xsawyerx@cpan.org> |
1133 | 1143 | |
1134 | 1144 | =back |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | 4 | |
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 | |
6 | 6 | |
7 | 7 | use Test::More tests => 1; |
8 | 8 | |
187 | 187 | ); |
188 | 188 | } |
189 | 189 | |
190 | pass; | |
190 | pass('Reported prereqs'); | |
191 | 191 | |
192 | 192 | # vim: ts=4 sts=4 sw=4 et: |