-
- Distribution: Plack
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository (git clone)
- Issues (88)
- Testers (2747 / 64 / 2)
- Kwalitee
- 80.55% Coverage
- License: perl_5
- Activity
- 24 month
- Tools
- Download (176.55Kb) 0
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Tatsuhiko Miyagawa
- Aaron Trevena
- Ævar Arnfjörð Bjarmason
- Akzhan Abdulin
-
Alexandr Ciornii
-
Alex J. G. Burzyński
- Allan Whiteford
- Andrew Fresh
- Andrew Rodland
- Andy Wardley
-
Aristotle Pagaltzis
-
Arthur Axel 'fREW' Schmidt
- Asato Wakisaka
- Ashley Pond V
- Ask Bjørn Hansen
-
ben hengst
-
Ben Morrow
- Bernhard Graf
- Chad Granum
-
chansen
-
Chia-liang Kao
-
cho45
-
Christian Walde
-
chromatic
-
Cosimo Streppone
-
Dagfinn Ilmari Mannsåker
- Daisuke Maki
-
Daisuke Murase
- Dave Marr
-
Dave Rolsky
-
David E. Wheeler
- David Schmidt
- David Steinbrunner
- dmaestro
- Eduardo Arino de la Rubia
- Eric Johnson
-
Eugen Konkov
-
Fabrice Gabolde
-
fayland
- Flavio Poletti
-
Florian Ragwitz
- franck cuny
-
Gianni Ceccarelli
-
Graham Knop
- Grant McLean
- Hans Dieter Pearcey
- Haruka Iwao
- Henry Baragar
-
hiratara
-
HIROSE Masaaki
- Hiroshi Sakai
- Ian Bradley
- Ian Burrell
- Jakob Voss
-
Jay Hannah
-
Jesse Luehrs
-
Jiro Nishiguchi
- Johannes Plunien
- John Beppu
-
John Napiorkowski
-
Jonathan Swartz
- José Pinheiro Neta
- Justin Davis
- kakuno
-
Kang-min Liu
-
Karen Etheridge
-
Kazuho Oku
- Keedi Kim
- Lee Aylward
- Leo Lapworth
- mala
- Marco Pessotto
- Marian Schubert
-
Mark Fowler
-
Mark Stosberg
- Masahiro Chiba
-
Masahiro Nagano
- Michael G. Schwern
-
mickey
-
Nick Wellnhofer
- Nobuo Danjou
- Olaf Alders
-
Oliver Gorwits
- Oliver Paukstadt
- Oliver Trosien
-
Olivier Mengué
- osfameron
- Panu Ervamaa
- Paul Driver
-
Pedro Melo
- Peter Flanigan
-
Peter Makholm
-
Piotr Roszatycki
-
punytan
-
Rafael Kitover
-
Randy Stauner
- Ray Miller
- Richard Simões
- Ricky Morse
-
Robert Rothenberg
- Rob Hoelz
-
Ryo Miyake
-
Sawyer X
- Scott S. McCoy
- Shawn M Moore
-
Shoichi Kaji
- smcmurray
- Stephen Clouse
- Stevan Little
- Stuart A Johnston
- Takeshi OKURA
- Thomas Klausner
-
Tim Bunce
- Tokuhiro Matsuno
-
Tomas Doran
- Tom Heady
- vti
- Wallace Reis
- xaicron
- Yann Kerherve
- yappo
-
Yury Zavarin
-
Yuval Kogman
- 唐鳳
- Dependencies
- Apache::LogFormat::Compiler
- Cookie::Baker
- Devel::StackTrace
- Devel::StackTrace::AsHTML
- File::ShareDir
- Filesys::Notify::Simple
- Hash::MultiValue
- HTTP::Entity::Parser
- HTTP::Headers::Fast
- HTTP::Message
- HTTP::Tiny
- parent
- Pod::Usage
- Stream::Buffered
- Test::TCP
- Try::Tiny
- URI
- WWW::Form::UrlEncoded
- CPAN Testers List
- Reverse dependencies
NAME
Plack::Middleware::AccessLog::Timed - Logs requests with time and accurate body size
SYNOPSIS
# in app.psgi
use Plack::Builder;
builder {
enable "Plack::Middleware::AccessLog::Timed",
format => "%v %h %l %u %t \"%r\" %>s %b %D";
$app;
};
DESCRIPTION
Plack::Middleware::AccessLog::Timed is a subclass of Plack::Middleware::AccessLog but uses a wrapped body handle to get the actual response body size %b
(even if it's not a chunk of array or a real filehandle) and the time taken to serve the request: %T
or %D
.
This wraps the response body output stream to capture the time taken for the PSGI server to read the whole response body.
This would mean, if the middleware is in use, it will prevent some server-side optimizations like sendfile(2) from working, as well as middleware like Plack::Middleware::ContentLength can't guess the body size out of the file handle.
If all you want is to capture the time taken in your PSGI application and do not want the wrapped body behavior described above, consider instead applying Plack::Middleware::Runtime and using Plack::Middleware::AccessLog to log the X-Runtime
header.
CONFIGURATION
Same as Plack::Middleware::AccessLog.
AUTHOR
Tatsuhiko Miyagawa
SEE ALSO
Module Install Instructions
To install Plack::Middleware::AccessLog::Timed, simply copy and paste either of the commands in to your terminal
cpanm Plack::Middleware::AccessLog::Timed
perl -MCPAN -e shell install Plack::Middleware::AccessLog::Timed
For more information on module installation please visit the detailed CPAN module installation guide.