I have a web app that uses google app engine .In ubuntu ,I start the app engine using
./dev_appserver.py /home/me/dev/mycode
In the mycode folder ,I have app.yml and the python files of the web app.In the web app code,I have used logging to write values of some variables like
import logging
LOG_FILENAME = '/home/me/logs/mylog.txt'
logging.basicConfig(filename=LOG_FILENAME,level=logging.DEBUG)
class Handler(webapp2.RequestHandler):
....
class Welcome(Handler):
def get(self):
if self.user:
logging.debug('rendering welcome page for user')
self.render('welcome.html',username= self.user.name)
else:
logging.debug('redirect to signup')
self.redirect('/signup')
class MainPage(Handler):
def get(self):
self.redirect('/welcome')
app = webapp2.WSGIApplication([('/', MainPage),('/signup', Register),('/welcome', Welcome)], debug=True)
I have set chmod 777 for the logs directory..Still no logs are created there.I am at a loss as to how any log can be viewed when google app engine runs..Since it is in linux,I don’t have a launcher with gui ..which makes it difficult to see the app engine logs if any are generated
If someone can help me solve this,it would be great.
Did you read this https://developers.google.com/appengine/articles/logging as I understand you must not declare your own log file