Monkey Raptor

Thursday, September 28, 2017

Google App Engine: Alternative on How to Write Logging Info to File

By default, Google App Engine isn't available for writing new system file. Every file system is READ-ONLY because of the infrastructure nature of App Engine, distributed.

In local development, if you're using Python SDK, you can rewrite certain part of dev_appserver_main.py to make the "write to file" feature sort of "available" on localhost. But that's maybe a bit too much, since it won't be available for actual deployed application anyhow.

Instead of rewriting the default function for local server, what I recommend is, create a datastore or blobstore to store the text/html logging output. That method then can be used for local development and live evil app you have. Hahahhaahah. Run Forrest!
How do you make a forest run? Put additional R in the word and make a movie about it.

And then for the supporting display module, create a custom URL to handle the "key" of that previously stored logging data. To display or monitor each specific stored data.

This "outputting logging info to file" method is important for previewing text/HTML layout for mailing purpose or for other purposes which might be important in your application.

The technical details will be different in each language: Python, Java, Go, PHP, etc. So I just share the main idea for that.

Smiley horse...

Google App Engine: Alternative on How to Write Logging Info to File
https://monkeyraptor.johanpaul.net/2017/09/google-app-engine-alternative-on-how-to.html

No comments

Post a Comment

Tell me what you think...