我正在使用 Java 和 Javascript 开发应用程序,并且我有一个电子邮件服务,如果应用程序发生错误,用户可以向我发送自动电子邮件。我现在让它向我发送一封空白电子邮件,但我希望它从控制台获取错误消息并将其粘贴到电子邮件中。我必须编写代码才能将其添加到电子邮件中,但如何从控制台获取信息?
编辑:
2012-05-03 10:20:46,449 [mobileapp] DEBUG Resolving exception from handler [null]: org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported
2012-05-03 10:20:46,449 [mobileapp] WARN Request method 'GET' not supported
2012-05-03 10:20:46,449 [mobileapp] DEBUG Null ModelAndView returned to DispatcherServlet with name 'mvc-dispatcher': assuming HandlerAdapter completed request handling
2012-05-03 10:20:46,449 [mobileapp] TRACE Cleared thread-bound request context: org.apache.catalina.connector.RequestFacade@741848