[Catalyst-dev] logging user with mod_perl
Carl Johnstone
catalyst at fadetoblack.me.uk
Tue Mar 6 15:16:39 GMT 2007
Hi,
I want to log the user to the apache access_log when using the mod_perl
engine in production.
I've hacked this by adding this to the "end" action of my app:
if ($c->user_exists) {
$c->apache->user($c->user);
}
It would be much nicer if this happened out of the box, so I don't have to
repeat the same for every app we build. If I hack this into "finalize_body"
in Catalyst::Engine::Apache it seems to work fine for apps that both do and
don't include Plugin::Authentication :
if ($c->can('user_exists') && $c->user_exists) {
$self->apache->user($c->user);
}
Would it be possible to have it added to the Engine for the next release?
Thanks
Carl
More information about the Catalyst-dev
mailing list