views:

80

answers:

1

How reliable are the Google App Engine logs?

Because logs are optimized for write speed, and the datastore is optimized for read speed, I'm thinking about storing some data by writing it to the logs rather than writing it to the datastore.

If I call Logger.info("something");, and the call succeeds, will that log entry definitely show up in the logs? Or will it sometimes silently fail?

About every hour I'll have my home computer download the logs to persist the data on my home computer.

+3  A: 

Although it's very unlikely, it's possible the call could silently fail, because logs are written asynchronously (or else they wouldn't be so fast). If you need reliability, using the task queue or deferred to insert a datastore entity might be a better option.

Nick Johnson
Thanks Nick, I'm okay with some rare loss of data, so maybe I'll give it a try. I'm mainly trying to save quota usage by doing it this way. I heard on the google group that there is a size limit to the log before it gets flushed, do you know about what that is?
Kyle
Hi Nick, I posted a follow up question here http://stackoverflow.com/questions/2427442/google-app-engine-about-how-much-quota-does-a-single-datastore-put-use . If you wouldn't mind taking a look at it.
Kyle