Re: How to show "access.log" in the browser

Tim Roberts <[email protected]> Sat, 6 May 2017 23:50:25 -0700
Newsgroups gmane.comp.python.cherrypy
Message-ID <[email protected]>
On Apr 24, 2017, at 12:22 AM, 'EDV Golze' via cherrypy-users <[email protected]> wrote:
> 
> i want to show the access.log of cherrypy in the browser. For the error.log it works, but not for the access.log.
> 
> For that i setup it as static file and make a link to it, but if i use the link i get only the output
> 
> "The requested resource returned more bytes than the declared Content-Length."
> 
> I guess there is a problem cause using the link writes to the log and the size of the file does not fit to the size cherryp expected to show the file.

Right.  That's probably because access.log is live, so you're getting additional messages that cause the file's length to change between the time it grabs the size and the time it reads the file.  Put another way, that is not technically a "static" file.  I'm not sure there's any easy answer.  You may need to copy it to a separate file and return that file.
— 
Tim Roberts, [email protected]
Providenza & Boekelheide, Inc.

-- 
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cherrypy-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
To post to this group, send email to cherrypy-users-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.