ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/lib/AnyEvent/Log.pm
(Generate patch)

Comparing AnyEvent/lib/AnyEvent/Log.pm (file contents):
Revision 1.51 by root, Thu Mar 22 18:00:35 2012 UTC vs.
Revision 1.53 by root, Tue Mar 27 16:21:11 2012 UTC

1045=over 4 1045=over 4
1046 1046
1047=item $ctx->log ($level, $msg[, @params]) 1047=item $ctx->log ($level, $msg[, @params])
1048 1048
1049Same as C<AnyEvent::Log::log>, but uses the given context as log context. 1049Same as C<AnyEvent::Log::log>, but uses the given context as log context.
1050
1051Example: log a message in the context of another package.
1052
1053 (AnyEvent::Log::ctx "Other::Package")->log (warn => "heely bo");
1050 1054
1051=item $logger = $ctx->logger ($level[, \$enabled]) 1055=item $logger = $ctx->logger ($level[, \$enabled])
1052 1056
1053Same as C<AnyEvent::Log::logger>, but uses the given context as log 1057Same as C<AnyEvent::Log::logger>, but uses the given context as log
1054context. 1058context.
1288 if (/\G(.+)/g) { 1292 if (/\G(.+)/g) {
1289 die "PERL_ANYEVENT_LOG ($spec): parse error at '$1'\n"; 1293 die "PERL_ANYEVENT_LOG ($spec): parse error at '$1'\n";
1290 } 1294 }
1291} 1295}
1292 1296
12931;
1294
1295=head1 EXAMPLES 1297=head1 EXAMPLES
1296 1298
1297This section shows some common configurations, both as code, and as 1299This section shows some common configurations, both as code, and as
1298C<PERL_ANYEVENT_LOG> string. 1300C<PERL_ANYEVENT_LOG> string.
1299 1301
1379 Marc Lehmann <schmorp@schmorp.de> 1381 Marc Lehmann <schmorp@schmorp.de>
1380 http://home.schmorp.de/ 1382 http://home.schmorp.de/
1381 1383
1382=cut 1384=cut
1383 1385
13861
1387

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines