Google App Engine - 找不到我的日志消息 [英] Google App Engine - Can not find my logging messages

查看:93
本文介绍了Google App Engine - 找不到我的日志消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法找到我的日志记录调用的结果。
要记录消息,我尝试了两种方法:

  System.out.println(some message); 

  Logger logger = Logger.getLogger(MyLogger); // Logger is java.util.logging.Logger 

// ...

logger.info(some message);

我已经部署了我的应用程序,经过几次测试后,我决定查看一些
日志消息。但是没有消息。我从默认的错误中将最低严重程度
等级更改为信息,并且只有我看到的消息是
这样的服务消息:



http://dl.dropbox.com/u/1678938/logs.png

如果有人显示一些记录一些数据的小片段(如果它有效),我也会很感激 - 我怀疑我的问题可能是那些愚蠢的问题之一问题已缩减为更具体的形式 - App Engine吃了信息 - 消息,但显示其他消息,如错误和警告消息。



在这次电话会议之后,我终于看到了我的消息:

  log.setLevel(Level.INFO); 

但它仍然不清楚 - 为什么没有显示信息消息。 Google的手册指出:


所有servlet写入
标准输出流(System.out)
和标准错误流(System.err)
被App Engine捕获并在应用程序日志中记录
。在标准输出流中写入
的行是在INFO级别记录的
,写入标准错误流
的行
在WARNING级别记录。 / p>


I can not find the results of my logging calls. To log messages I tried both:

System.out.println("some message"); 

and

Logger logger = Logger.getLogger("MyLogger"); // Logger is java.util.logging.Logger 

// ... 

logger.info("some message"); 

I have deployed my app and after few tests I decided check out some log messages. But there were no messages. I changed minimum severity level to "Info" from default "Error", and only messages i've seen were service messages like this:

http://dl.dropbox.com/u/1678938/logs.png

I would also be grateful if someone show a little snippet with logging some data (if it's works) - I suspect my problem may be the one of that stupid problems when somewhat incorrectly located comma can be the cause of situation.

解决方案

Problem has shrunk into more concrete form - App Engine "eats" info-messages, but shows others, such as error and warning messages.

After this call I have eventually seen my info messages:

log.setLevel(Level.INFO);

But it is still not clearly - why info-messages weren't being shown. Google's manual states:

Everything the servlet writes to the standard output stream (System.out) and standard error stream (System.err) is captured by App Engine and recorded in the application logs. Lines written to the standard output stream are logged at the "INFO" level, and lines written to the standard error stream are logged at the "WARNING" level.

这篇关于Google App Engine - 找不到我的日志消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆