can not get grizzly logging to work, nothing writt

2019-06-26 21:59发布

I have a simple Java/Spring program using a standard log4j.properties file to control logging, which is working fine. When we added Grizzly via:

GrizzlyHttpServerFactory.createHttpServer(uri, resourceConfig)

things work (i.e. the server in fact serves...but I get no log output.

I have an explicit entry in log4j.properties for "org.glassfish.grizzly".

I've gone so far as to debug into Grizzly's ExtendedLogger class and can see that its getting close to logging but then doesn't.

1条回答
仙女界的扛把子
2楼-- · 2019-06-26 22:20

Turns out Grizzly uses its own logging based on java.util.logging rather than than log4j or slf4j which means you need a separate logging configuration file. A good description of using that is at: http://www.javapractices.com/topic/TopicAction.do?Id=143

查看更多
登录 后发表回答