in reply to Logging logins!
Ofcourse you can use $r->log->debug. The Apache config file should then contain something likepackage Apache::LogAuth; use strict; use Apache::Constants qw(:common); sub handler { my $r = shift; my ($res, $sent_pw) = $r->get_basic_auth_pw; return $res if $res != OK; my $user = $r->connection->user; unless ($user && $sent_pw) { return AUTH_REQUIRED; } open(SOMELOG,">>somelogfile") || return DECLINED; print SOMELOG $user,"\n"; close(SOMELOG); return OK; } 1;
Another option is to just log $ENV{REMOTE_USER} with a script... but that doesn't specifically cover logins :)<LOCATION /> AuthName Restricted AuthType Basic PerlAuthenHandler Apache::LogAuth require valid-user </LOCATION>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Logging logins!
by scisuk (Initiate) on May 20, 2002 at 13:10 UTC | |
by Beatnik (Parson) on May 20, 2002 at 13:23 UTC | |
by scisuk (Initiate) on May 20, 2002 at 13:42 UTC | |
by Beatnik (Parson) on May 20, 2002 at 13:47 UTC |