… | |
… | |
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. |