I'm trying to do some simple logging in GAE, though I think I must be missing some simple step.
I have followed the instructions here: https://developers.google.com/appengine/docs/java/runtime#Logging
I wish to write a simple message to the log, like so:
public class InsertServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
private static final Logger log = Logger.getLogger(InsertServlet.class.getName());
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
log.info("Handled GET request - custom message");
resp.setContentType("text/plain");
resp.getWriter().println("HELLO");
}
}
If I visit my app with the web browser, I can see that it is working (get the "HELLO" message in the browser).
However after this, if I visit the logs in the console, I can see that it is logging the event, but I don't see my message anywhere.
I have selected "Show: All Requests", but this is all I see in the logs after my visit:
012-08-19 13:34:56.488 /insert 200 2922ms 0kb Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0.1
2602:306:ce97:de40:8dbd:ace7:14c3:89e2 - - [19/Aug/2012:13:34:56 -0700] "GET /insert HTTP/1.1" 200 52 - "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0.1" "karwosts-helloworld.appspot.com" ms=2923 cpu_ms=1213 api_cpu_ms=0 cpm_usd=0.000006 loading_request=1 instance=00c61b117cf339fa358dc217b91a9f45b8c30f
I 2012-08-19 13:34:56.487
This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application.
Logging.Properties (only one line):
.level = WARNING
appengine-web.xml
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>karwosts-helloworld</application>
<version>1</version>
<threadsafe>true</threadsafe>
<!-- Configure java.util.logging -->
<system-properties>
<property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
</system-properties>
</appengine-web-app>
Where is my custom log.info
string? Am I not looking at the right place?