Skip to content

Instantly share code, notes, and snippets.

@pmakholm
Created February 7, 2013 15:12
Show Gist options
  • Save pmakholm/4731520 to your computer and use it in GitHub Desktop.
Save pmakholm/4731520 to your computer and use it in GitHub Desktop.
use Plack::Builder;
my $access_log = ...;
builder {
open my $logfh, ">>", $access_log
or die "Couldn't open $access_log: $!";
enable "AccessLog::Timed",
format => "%v %h %l %u %t \"%r\" %>s %b %D",
logger => sub { $logfh->print( @_ ) };
$app;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment