Hi Adam,
I have not tried this in GAE, but you should be able control the
logging level (and a whole lot more) in all of your scripts via a
single configuration file. You will have to add a line to all of your
scripts that point to the file, but after that the logging level is
controlled by that configuration file. (One change to the
configuration file and a redeploy would change the logging in all of
your scripts.)
Take a look at this site for information on how to do this:
http://docs.python.org/library/logging.html
On the performance/overhead question - I usually try to limit any
logging statements that would log large amounts of information to
except code blocks in my production code. My logic behind that is
that if the code has already had an exception that the user experience
is already diminished, so taking a bit of extra time to make sure that
I have the documentation to fix the problem is beneficial to their
future experience.
Hope this helps.
Doug
On Mar 14, 8:39 am, Adam adamsplug...@gmail.com wrote:
Any guidelines for how much logging we want to leave in our production
code?
specifically:
- is the overhead of debug logging significant enough to worry about
- is there an easy way to disable log messages below a certain level
- do I need to do this in every script file, or is there something I
can do inside app.yaml
- is this significantly less efficient than removing the log calls
(e.g. how fast does it short-circuit)
- do any of these answers change based on how active the app is. e.g.
the log call itself may be efficient, but when the amount of data
being logged becomes large I could imagine that the infrastructure
code to clean up old records to free up space could be non-trivial and
have some performance impacts
thanks,
Adam
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---