Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dex4er/perl-plack-middleware-trafficlog
Plack::Middleware::TrafficLog - Log headers and body of HTTP traffic
https://github.com/dex4er/perl-plack-middleware-trafficlog
Last synced: 10 days ago
JSON representation
Plack::Middleware::TrafficLog - Log headers and body of HTTP traffic
- Host: GitHub
- URL: https://github.com/dex4er/perl-plack-middleware-trafficlog
- Owner: dex4er
- Created: 2012-08-06T06:55:10.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2023-06-22T22:19:26.000Z (over 1 year ago)
- Last Synced: 2024-10-28T09:01:50.511Z (about 2 months ago)
- Language: Perl
- Homepage:
- Size: 93.8 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- Changelog: Changes
Awesome Lists containing this project
README
NAME
Plack::Middleware::TrafficLog - Log headers and body of HTTP traffic
SYNOPSIS
# In app.psgi
use Plack::Builder;
builder {
enable "TrafficLog", with_body => 1;
};DESCRIPTION
This middleware logs the request and response messages with detailed
information about headers and the body.The example log:
[08/Aug/2012:16:59:47 +0200] [164836368] [127.0.0.1 -> 0:5000] [Request ]
|GET / HTTP/1.1|Connection: TE, close|Host: localhost:5000|TE: deflate,gzi
p;q=0.3|User-Agent: lwp-request/6.03 libwww-perl/6.03||
[08/Aug/2012:16:59:47 +0200] [164836368] [127.0.0.1 <- 0:5000] [Response]
|HTTP/1.0 200 OK|Content-Type: text/plain||Hello WorldThis module works also with applications that have delayed response. In
that case, each chunk is logged separately and shares the same unique
ID number and headers.The body of the request and response is not logged by default. For
streaming responses, only the first chunk is logged by default.SEE ALSO
Plack, Plack::Middleware::AccessLog.
BUGS
This module has an unstable API and it can be changed in the future.
The log file can contain binary data if the PSGI server provides binary
files.If you find the bug or want to implement new features, please report it
at http://github.com/dex4er/perl-Plack-Middleware-TrafficLog/issuesThe code repository is available at
http://github.com/dex4er/perl-Plack-Middleware-TrafficLogAUTHOR
Piotr Roszatycki
LICENSE
Copyright (c) 2012, 2014-2015, 2023 Piotr Roszatycki .
This is free software; you can redistribute it and/or modify it under
the same terms as perl itself.See http://dev.perl.org/licenses/artistic.html