I just create a table
db.define_table('log',
                Field('msg'),
                Field('log_datetime','datetime',default=request.now))

then

log=db.log.insert

then
somewhere in your code when you want to log just do

log(msg="blablabla")

instead of print

2017-01-16 7:51 GMT+00:00 Dave S <[email protected]>:

>
>
> On Sunday, January 15, 2017 at 6:45:08 PM UTC-8, Alwyn Pan wrote:
>>
>> Hi there,
>>
>> I have a web2py app (in Ubuntu), which outputs debug information to
>> console. I can see the output in my dev-environment with no problem. But
>> now I need to move it to the production site, I prepare the site using the
>> one-step production-deployment script provided by Web2py. Now I am not able
>> to see any output other than from the Apache error log.
>>
>> Is there a way for me to see the output in an SSH terminal without using
>> "tail"?
>>
>> Thank you.
>>
>
>
> Maybe replace your print() calls with logging calls?
> <URL:http://web2py.com/books/default/chapter/29/04/the-core#Logging>
>
> Consoles tend to have important stuff scroll off the screen when secondary
> errors occur, or if a lot of routine output is done before you can examine
> the console, and log files can be searched by your editor.
>
> I was slow to move to log files myself, and in development you get quicker
> feedback from a console if you have a window open for it, but for
> production log files are better.
>
> /dps
>
>
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to