Contenu connexe
Similaire à 20120526 hachioji.pm
Similaire à 20120526 hachioji.pm (6)
20120526 hachioji.pm
- 2. アジェンダ
• AE::log の話でもしようと思ってた
• yairc のソースで一カ所引っかかった
のでネタに
12年5月26日土曜日
- 6. • enable "SimpleLogger", level => 'debug';
(yairc/chat.psgi より)
• なにこれ
• 実はコピペじゃないかと
pocketio/examples/chat/chat.psgi
12年5月26日土曜日
- 7. • enable "SimpleLogger", level => 'debug';
(yairc/chat.psgi より)
• なにこれ
• 実はコピペじゃないかと
pocketio/examples/chat/chat.psgi
• しかも使ってないんじゃないか
12年5月26日土曜日
- 8. SimpleLoggerの使い方
my $app = sub {
my $env = shift;
my $req = Plack::Request->new($env);
$req->logger->({level => 'info', message => "This is a debug
message"});
...
};
builder {
enable "Plack::Middleware::SimpleLogger", level => 'info';
$app;
};
12年5月26日土曜日
- 9. 仕組み
• $env->{‘psgix.logger’}
A code reference to log messages.
• SimpleLogger は psgix.logger へ関数を
セット
• $r->logger は psgix.logger のゲッター
12年5月26日土曜日
- 10. その他の psgix.logger
• Plack::Middleware::SimpleLogger
• Plack::Middleware::Log4perl
• Plack::Middleware::LogDispatch
• Plack::Middleware::NullLogger
• Plack::Middleware::Log::Contextual
• Plack::Middleware::ConsoleLogger
• Plack::Middleware::Log::Minimal
12年5月26日土曜日