Forums

server/error log is always empty

After reloading my wepapp my server log didnt populate anymore. I've got a error report from an user but when i checked on the log and error log and there was nothing. Any ideas why this could be happening? I do have my flask app mode in Debug, but its been like that for this time and previously i was able to see the server log just fine.

thanks!

I can see some errors in the error and server logs right now -- did you change something?

One possibility is that when you looked at them yesterday, the logs had been rotated. Every day, we move your old log files to one side and create fresh ones, so that they don't grow without bound. You can see the old ones if you look in /var/log in your file storage.

Oh, my bad, didnt know about that folder. Thanks for replying so fast!

No problem! We should add a link to it, really -- it's not super-discoverable.

I added " print >> sys.stderr, "SOME LOGGING..." " to one of my running py files, but I cannot see it in error log file, what am i doing wrong ?

PS: I am using web2py

Depending on how your web framework deals with sys.stderr, it could appear in the server log instead of the error log. We haven't yet worked out how to unify all the logging that frameworks do.

Thanks, I now use just print, and it is in server.log :)

hello, my access log displays no problem but my server and error logs are blank. Do you know the reason for this?

Sorry about that! We did some system maintenance last night -- it was finished at 00:20, about eight hours before your post, but it looks like there were some logging problems afterwards that we didn't pick up on. Everything should be OK as of 09:30 UTC (about three hours ago).

i have put print in another py file but that was not shown in the server log

in server log i can see only views.py print statement

please help me how can i see the print statement in another py files

Did you add the flush=True kwarg to your print statement, like this:

print("something", flush=True)

...? If not, try doing it -- without that, Python will keep prints in a buffer and only write them out when the buffer fills up.