How to show "access.log" in the browser

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to show "access.log" in the browser

cherrypy-users mailing list
Hello,

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.

How can i slove this easily without reading from the log and show it as html-page.






greets

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Tim Roberts
On Apr 24, 2017, at 12:22 AM, 'EDV Golze' via cherrypy-users <[hidden email]> 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, [hidden email]
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.