Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3407888
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:48:23+00:00 2026-05-18T05:48:23+00:00

<< Big update below implies it’s simply a logging issue >> I’m trying to

  • 0

<< Big update below implies it’s simply a logging issue >>

I’m trying to get app engine setup with python and having some problem that I suspect is some simple step I’ve missed. My app.yaml says this:

application: something  #name here is the one I used to register i.e. something.appspot.com
version: 1
runtime: python
api_version: 1

handlers:
- url: .*
  script: myapp.py

and my myapp.py says this:

import cgi
import Utils
import Sample
import logging

from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext import db

class MainPage(webapp.RequestHandler):
    def get(self):
        self.response.out.write('<html><body>')
        self.response.out.write('Welcome to my server! Why is this not working?')
        self.response.out.write('</body></html>')

def main():
    application = webapp.WSGIApplication([('/', MainPage),
                                        ('/Sample', Sample.HttpRequestHandler)],
                                        debug=True)

    run_wsgi_app(application)

if __name__ == "__main__":
    main()

When I run this on localhost, I get my html “Welcome” message when passing in / but when I pass in /Sample I don’t get any where. Also, I can’t seem to log messages. I call logging.debug() and nothing shows on the log console. Any ideas? Here is my Sample.py. Sorry about the strange tabbing. Copy paste didn’t line them up and editing it by hand didn’t seem to correct it.

class HttpRequestHandler(webapp.RequestHandler):
    def get(self):

        Utils.log("Sample handler called")

        try:
            if HttpRequestHandler.requestIsValid(self):

            intParam = int(self.request.get('param1'))
            floatParam = float(self.request.get('param1'))
            stringParam = self.request.get('param1')

            Utils.log("params: " + str(intParam) + " " + str(floatParam) + " " + stringParam)

            if intParam == 1:
                self.response.set_status(200, message="Success")
            else:
                self.response.set_status(400, message="Error processing sample command")

            else:
            raise StandardError

        except Exception, e:
            logging.debug("Exception: %s" % (e))
            self.response.set_status(400, message="Error processing sample command")

    def requestIsValid(self):
        if self.request.get('param1') != "" and \
        self.request.get('param2') != "" and \
        self.request.get('param3') != "":
            return True
        else:
            return False

So I know this is totally lame, but since I couldn’t see any log messages, I threw in a bunch of “raise StandardError” calls just to see what would throw exception output to my browser window when I try to invoke my Sample message. What I found was that the server is calling into the Sample handler just fine it seems, even checking the int param is right.

I think the problem is that I just can’t see my log messages! Any idea why they aren’t showing up? I call logging.debug() through those Util.log() calls. Is there some flag or something suppressing my output from showing in the log console?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T05:48:24+00:00Added an answer on May 18, 2026 at 5:48 am

    I discovered that indeed it was a logging issue (everything underneath was working just fine). I use Google App Engine Launcher, so here’s what I had to do with the settings to get it to work:

    Go into Edit -> Application Settings

    under Extra Flags add the flag -d

    I also selected to clear the datastore at launch in my settings, but I don’t think this impacts the logs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

(please read the update section below, I leave the original question too for clarity)
Big problem. I'm not sure what it was that I did, but it seems
I am reviewing a big java application to see if there are any performance
I have a big string (let's call it a CSV file, though it isn't
It's big problem to convert mod_rewrite rules to lighttpd format
What is Big O notation? Do you use it? I missed this university class
Server virtualization is a big thing these days, so I'm tasked at work to
i have a big web application running in perl CGI. It's running ok, it's
I'm a big fan of the Jadclipse plugin and I'd really like to upgrade
I have a big load of documents, text-files, that I want to search for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.