If you are logging lots of things don’t use logs. Especially if you want to look at them later. Logs are not permanent, Not guaranteed, and not something you should make a dependency.
PS
Disabling logging speeds our app up quite a bit (30-50 ms per request)
We use logs some, but we find that for the really critical stuff or really detailed stuff we are happier with writes to the datastore.
I didn’t really mean don’t log for debugging, I meant consider Logging to datastore.
Logging also changes results sometimes…
Don’t ask me why.
But for example we used to do performance numbers like
Log time and what we are about to do.
Do something
Log time and what we just did.
Do some things.
Log time and what we are about to do.
Do something
Log time and what we just did.
Then we switched to
Variable = time and what we are going to do
Do something
Variable .= time and what we just did.
Then the last line before Return is either log it, or write it to the data store
[...]
While it is true that logging adds some overhead, he's talking about a backend task. So it is presumably a longer-running more involved process. Logging is great in these cases because it allows you to watch the process running live. I find this immensely valuable.
Robert
import logging
for i in xrange(1500):
logging.info(i)
Results: first line logged was 500, last line logged was 1499.
Robert
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine/-/_SlFWr3v6PgJ.