[Bps-public-commit] Prophet - A disconnected, replicated p2p database branch, master, updated. a9394be78df2380e27dab67f87cc4fc9d365fa1d
jesse
jesse at bestpractical.com
Sat Jan 31 01:07:22 EST 2009
The branch, master has been updated
via a9394be78df2380e27dab67f87cc4fc9d365fa1d (commit)
from e2b8d65ff0844ec421ab628274728911998a4da7 (commit)
Summary of changes:
lib/Prophet/Server.pm | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit a9394be78df2380e27dab67f87cc4fc9d365fa1d
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Sat Jan 31 01:06:47 2009 -0500
Exracted request logging so subclasses can override it
diff --git a/lib/Prophet/Server.pm b/lib/Prophet/Server.pm
index 607c2d5..c10e06f 100644
--- a/lib/Prophet/Server.pm
+++ b/lib/Prophet/Server.pm
@@ -102,7 +102,7 @@ sub js {
sub handle_request {
my ( $self, $cgi ) = validate_pos( @_, { isa => 'Prophet::Server' }, { isa => 'CGI' } );
$self->cgi($cgi);
- $self->app_handle->log( localtime()." [".$ENV{'REMOTE_ADDR'}."] ".$cgi->request_method . " ".$cgi->path_info);
+ $self->log_request();
$self->nav( Prophet::Web::Menu->new( cgi => $self->cgi ) );
$self->result( Prophet::Web::Result->new() );
if ( $ENV{'PROPHET_DEVEL'} ) {
@@ -123,7 +123,6 @@ sub handle_request {
$dispatcher_class = "Prophet::Server::Dispatcher";
}
-
my $d = $dispatcher_class->new( server => $self );
$d->run( $cgi->request_method . $cgi->path_info, $d )
@@ -131,6 +130,12 @@ sub handle_request {
}
+sub log_request {
+ my $self = shift;
+ my $cgi = $self->cgi;
+ $self->app_handle->log( localtime()." [".$ENV{'REMOTE_ADDR'}."] ".$cgi->request_method . " ".$cgi->path_info);
+}
+
sub update_record_prop {
my $self = shift;
my $type = shift;
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list