… | |
… | |
1045 | =over 4 |
1045 | =over 4 |
1046 | |
1046 | |
1047 | =item $ctx->log ($level, $msg[, @params]) |
1047 | =item $ctx->log ($level, $msg[, @params]) |
1048 | |
1048 | |
1049 | Same as C<AnyEvent::Log::log>, but uses the given context as log context. |
1049 | Same as C<AnyEvent::Log::log>, but uses the given context as log context. |
|
|
1050 | |
|
|
1051 | Example: 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 | |
1053 | Same as C<AnyEvent::Log::logger>, but uses the given context as log |
1057 | Same as C<AnyEvent::Log::logger>, but uses the given context as log |
1054 | context. |
1058 | context. |
… | |
… | |
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 | |
1293 | 1; |
|
|
1294 | |
|
|
1295 | =head1 EXAMPLES |
1297 | =head1 EXAMPLES |
1296 | |
1298 | |
1297 | This section shows some common configurations, both as code, and as |
1299 | This section shows some common configurations, both as code, and as |
1298 | C<PERL_ANYEVENT_LOG> string. |
1300 | C<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 | |
|
|
1386 | 1 |
|
|
1387 | |