Grizzly Standalone Logging

前端 未结 3 1035
余生分开走
余生分开走 2020-12-19 07:06

i have setup a standalone grizzly/jersey server using maven and referencing the following dependencies


  org.glassfish.griz         


        
3条回答
  •  攒了一身酷
    2020-12-19 07:38

    Check if you can log something with level FINE in your application.

    Logger LOG = Logger.getLogger(MyResource.class.getName());
    LOG.log(Level.FINE, "a message")
    

    Jersey is using JDK logging and to see its debug output (e.g. in the grizzly console) you have to get the logging configuration right. This configuration file worked for me:

    handlers=java.util.logging.ConsoleHandler
    .level=FINE
    java.util.logging.ConsoleHandler.level=ALL
    

提交回复
热议问题