Does logging work on the dev server? This code doesn't raise an exception, but I can't see where to view the logs in the devserver console. Perhaps I'm looking in the wrong place?
logging.error("error has occurred")
Does logging work on the dev server? This code doesn't raise an exception, but I can't see where to view the logs in the devserver console. Perhaps I'm looking in the wrong place?
logging.error("error has occurred")
Yes, logging works on the dev server. When dev_appserver.py is run from the command-line, you should see output from logging calls such as the one you mentioned whenever they are called.
By default, only logging messages of INFO level and higher are printed.
Also, logging.error()
does not raise an exception when called. It simply logs the string you pass at the "error" level - on the development server, this basically just means it will print "ERROR" as part of the logging message on the development server.