Answer the question
In order to leave comments, you need to log in
Google App Engine and printStackTrace -- how to log
Is there a standard way to display Exception.printStackTrace() information in the Google App Engine log (control panel)?
For some reason, I was sure that it was written there by default and actively used it. And now you need to either redo everything, or find how to turn it on.
I have been working with Java recently, please do not kick with your feet.
Answer the question
In order to leave comments, you need to log in
Well, in general, the standard printStackTrace writes to System.err => should get into the application logs. Where exactly are you looking? Does everything from System.out / System.err get there?
Try to just rewrite the entire stack to a standard logger.
try {
//Some code
} catch (Exception e) {
for (StackTraceElement ste : e.getStackTrace()) {
log.error(e.toString());
}
}
By the way, interestingly, System.out.print ln ("test") appears in the logs. But System.out.print("test") is not. If you add the characters "\r\n" at the end of the line, it starts to appear. The same goes for System.err. Looks like a bug in Google...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question