What is Web2Py Doing in Background? β€” How To See Web2py WorkFlow When The Server is Active?

82 views
Skip to first unread message

PRACHI VAKHARIA

unread,
Oct 18, 2016, 3:49:06β€―AM10/18/16
to web2py-users


What is Web2Py Doing in Background? β€”orβ€” How To See Web2py WorkFlow When The Server is Active?
  • How can a developer see what the Web2Py application and server are doing when it is doing something?
  • How to get a Verbose listing of what the w2p/server is doing in realtime?

Thank you!

Anthony

unread,
Oct 18, 2016, 8:08:39β€―AM10/18/16
to web2py-users
See http://web2py.com/books/default/chapter/29/04/the-core#Logging. Note, the framework itself will only issue a limited number of INFO logs, so you won't have much visibility into the framework.

You can also set up profiling and logging of the HTTP requests (i.e., a list of each handled HTTP request) via gluon.main.appfactory.

Anthony

Leonel CΓ’mara

unread,
Oct 18, 2016, 6:08:08β€―PM10/18/16
to web2py-users
What exactly do you mean? It is possible to see the complete workflow of what web2py is doing, for instance, using a python profiler, but this would be madness on an active server as it would make it extremely slow.

PRACHI VAKHARIA

unread,
Oct 19, 2016, 5:04:24β€―PM10/19/16
to web2py-users

The goals is learning – to see and understand the process and working happening in the background to make everything work – to see the web2py in action from inside.

Currently, web2py works so well that one does not need to worry about things like that, which is great, but it also hides the workings which limits the learning using w2p of itself!

So, a little compromise on speed to see the workings would be akin to seeing a car's engine and transmission in action on a stationary car.

Thank you.

PRACHI VAKHARIA

unread,
Oct 19, 2016, 5:07:04β€―PM10/19/16
to web2py-users

See http://web2py.com/books/default/chapter/29/04/the-core#Logging. Note, the framework itself will only issue a limited number of INFO logs, so you won't have much visibility into the framework.

You can also set up profiling and logging of the HTTP requests (i.e., a list of each handled HTTP request) via gluon.main.appfactory.

Anthony


Thank you, Anthony. I shall look into that and learn as much as possible from that. πŸ˜‡

Anthony

unread,
Oct 19, 2016, 7:56:55β€―PM10/19/16
to web2py-users
On Wednesday, October 19, 2016 at 5:04:24 PM UTC-4, PRACHI VAKHARIA wrote:

The goals is learning – to see and understand the process and working happening in the background to make everything work – to see the web2py in action from inside.

Currently, web2py works so well that one does not need to worry about things like that, which is great, but it also hides the workings which limits the learning using w2p of itself!

So, a little compromise on speed to see the workings would be akin to seeing a car's engine and transmission in action on a stationary car.

You might start by simply studying the source code. When an HTTP request comes in, the starting point is a call to gluon.main.wsgibase. Start there, and you can follow all the logic that executes in response to a request.

Anthony

Anthony

unread,
Oct 19, 2016, 8:25:05β€―PM10/19/16
to web2py-users

You might also find it helpful to watch this video, starting at about 58:20 (a walk through the framework code showing how an HTTP request is handled).

Anthony
Reply all
Reply to author
Forward
0 new messages