You have no way of knowing the mac address. It logs the IP already. It
always logs 127.0.0.1 if behind a proxy.

On Jan 21, 7:13 pm, jlegler <jleg...@gmail.com> wrote:
> Hrm, I've been able to make it detect when the download begins, but
> determining when it finishes is a horse of a different color.  Is the
> web2py httpserver.log customizable at all?  Can I make it log the MAC
> address or the IP of the machine downloading the file?
>
> On Jan 21, 6:02 am, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > You could check the web server logs in web2py/httpserver.log or the
> > apache logs.
>
> > You could also implement your own download action:
>
> > db.define_table('mylog',Field('filename'),Field
> > ('start','datetime'),Field('stop',datetime'))
>
> > def static():
> >     import datetime
> >     path = os.path.join(request.folder,'static','/'.join
> > (request.args))
> >     db.mylog(filename=path,start=datetime.datetime.now())
> >     return response.stream(open(path,'rb'))
>
> > I cannot think of an easy way to log the stop time.
>
> > On Jan 21, 7:24 am, jlegler <jleg...@gmail.com> wrote:
>
> > > Is there any way to log when files are downloaded from the static
> > > directory of an app and see when they started downloading and when
> > > they completed?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to