Hi Diana,

Throwable.printStackTrace() writes to System.err. App Engine ties System.err
to the java.util.logging.Logger named <stderr> using the Warning logging
level. If you've redirected System.err or don't have logging configured
correctly, your stacktraces can end up going somewhere else or getting
squashed. If you don't believe that's the problem, please provide us with
the simplest war that reproduces the symptom. You might also want to verify
that you can print to System.err directly without problems.

On Sat, Sep 19, 2009 at 11:34 AM, Diana Cruise <diana.l.cru...@gmail.com>wrote:

>
> What does GAE do with standard dumps such as e.printStackTrace()?
> Here is the Admin Console Log output in DEBUG mode for my test:
>
> I 09-19 08:14AM 54.605 [app1-widget/1.336449820535414591].<stdout>:
> hello, testMode=false
> I 09-19 08:14AM 54.605 org.apache.jsp.test_jsp _jspService: hello2
> I 09-19 08:14AM 54.606 [app1-widget/1.336449820535414591].<stdout>:
> hello3
>
> The output above comes from the code snippet below which tests Stdout,
> Logger, and then a forced stack dump.  As you can see the stack dump
> identified with the message "hello4" is NOT in the log output above.
> How do I view this stack dump in GAE?
>
> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
> <%@ page import="java.util.*,
>        widget.presentation.common.*"
> %>
> <%
> try {
>  UserSession userSess = UserSession.get(session, request, response);
>  System.out.println("hello, testMode=" + userSess.isTestMode());
>  java.util.logging.Logger logger = java.util.logging.Logger.getLogger
> ("widget");
>  logger.log(java.util.logging.Level.INFO, "hello2");
>  userSess.logInfo("hello3");
>  if (true) throw new Exception("hello4");
> %>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <table border="0" cellpadding="0" cellspacing="0" width="100%">
>        <tr>
>                <td width="15%" valign="top">
>                        <table border="0" cellpadding="0" cellspacing="0"
> width="100%">
> ...
> </table>
> <%
> } catch (Exception e) { e.printStackTrace(); }
> %>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to