Web2py + Nginx - Logging

41 views
Skip to first unread message

Luciano Bovio

unread,
Jul 1, 2020, 5:51:32 PM7/1/20
to web2py-users
Is it possible to log web2py output messages  to a file when running web2py+nginx+uwsgi (installed with provided ubuntu script) ?

I need to view the messages that i see in console when running rocket server.

Thanks

Dave S

unread,
Jul 2, 2020, 1:19:21 AM7/2/20
to web2py-users
The built-in logging works pretty good.  Replace your print statements with logger.debug() or logger.error() ...The same formatted string you fed print works for the argument of logger.debug.   Log files are in web2py/logs, and there's an autorotate feature to prevent logs from takng over your server.


(I'm running nginx+uwsgi on AWS linux)

/dps
 

icodk

unread,
Jul 2, 2020, 5:46:31 PM7/2/20
to web2py-users
 I have a system running  Web2py + Nginx + ubuntu  (installed with provided ubuntu script)   and all print statements are logged to the uwsgi log at  /var/log/uwsgi
Reply all
Reply to author
Forward
0 new messages