I cannot find a documented way of directing the traceback to the console. A command line option to show traceback data in the console might be useful.
On 23 ene, 13:13, Iwan Gabovitch <[email protected]> wrote: > Hello, > > I run web2py locally, to develop a website. Whenever there is an error, I > see a website that looks like this: > > *Internal errorTicket issued: > > > *vpp2py/127.0.0.1.2012-01-23.17-14-03.ef3e7489-1e25-4aaf-e143-9b27004c4a2c<http://example.com/> > > I would prefer to see the traceback in the shell. > > Is there a way to make web2py pass error messages to std output or a file > (with human-readable formatting)? > > I can output the application/appname/error/* files (Thanks to the nice > people of #bash at irc.freenode/net !): > > inotifywait . -m -e CLOSE_WRITE --format '%f' | while IFS= read -r f; do > cat "$f" | sed -e 's/[^\]\\n/\n/g'; done > > but I have a bad feeling about this, especially because of strings like > '\r' turning into '\\r' and '\n' being used in the file instead of > proper(?) newlines. Here's an example of what the 3-rd last line of a log > file looks like: > > S'Traceback (most recent call last):\n File > "/home/qubodup/web/web2py/gluon/restricted.py", line 191, in restricted\n > ccode = compile2(code,layer)\n File > "/home/qubodup/web/web2py/gluon/restricted.py", line 178, in compile2\n > return compile(code.rstrip().replace(\'\\r\\n\',\'\\n\')+\'\\n\', layer, > \'exec\')\n File > "/home/qubodup/web/web2py/applications/vpp2py/models/db.py", line 38\n > plugins = PluginManager()x # for configuring plugins\n > ^\nSyntaxError: invalid syntax\n' > > Thanks for reading. If nobody knows a better solution, hopefully the > inotifywait line will come in handy to somebody else. :)

