| Plack::Middleware::LogAny(3pm) | User Contributed Perl Documentation | Plack::Middleware::LogAny(3pm) |
Plack::Middleware::LogAny - Use Log::Any to handle logging from your PSGI application
# in app.psgi file
use Plack::Builder;
# PSGI application
my $app = sub { ... };
# DSL interface
builder {
enable 'LogAny', category => 'plack', context => [ qw( X-Request-ID ) ];
$app;
}
# alternative OO interface
Plack::Middleware::LogAny->wrap( $app, category => 'plack', context => [ qw( X-Request-ID ) ] );
LogAny is a Plack::Middleware component that allows you to use Log::Any to handle the "psgix.logger" logging object. This object is a code reference that is described in PSGI::Extensions.
This method initializes the logger using the category that you (optionally) set.
This method sets the logging object and the logging context. The logging context is localized.
Sven Willenbuecher <sven.willenbuecher@kuehne-nagel.com>
This software is copyright (c) 2012 by Michael Alan Dorman.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Log::Any
| 2024-08-03 | perl v5.38.2 |