简体   繁体   English

日志未显示在Google App Engine项目控制台下

[英]Logs don't show up under Google App Engine project console

I'm struggling with this basic stuff for weeks already. 我已经为这个基本的东西挣扎了好几个星期。 Can't make simple logs working in my Google App Engine (JAVA) app. 无法在我的Google App Engine(JAVA)应用中使用简单的日志。

I started from this tutorial . 我从本教程开始。 Looks pretty straight forward. 看起来挺直的。

Inside my Endpoint class I've defined a Logger like this: 在我的Endpoint类中,我定义了一个Logger如下所示:

private static final Logger log = Logger.getLogger(GowMainEndpoint.class.getName());

Then in one of my endpoint methods I tried to log event like: 然后在我的一种端点方法中,我尝试记录以下事件:

log.info("test");

There is nothing showing up in logs. 日志中没有任何显示。 I have logging.properties file and appengine-web.xml configured just like in the mentioned tutorial. 我已经配置了logging.properties文件和appengine-web.xml,就像在提到的教程中一样。

EDIT: Weird thing: log.warning("test"); 编辑:奇怪的事情: log.warning("test"); is showing up logs... 正在显示日志...

Ok I figured it out: 好的,我知道了:

in the logging.properties file I've changed logging.properties文件中,我已更改

.level = WARNING

to

.level = INFO

The comment line says: 评论行说:

# Set the default logging level for all loggers to INFO

but now I got the feeling it should be more like: 但现在我感觉应该更像是:

# Set the MINIMUM logging level for all loggers to INFO

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM