有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java Jetty Runner IDEA社区日志

我正在使用Intellij IDEA社区进行一个项目,因此我正在使用Jetty Runner在localhost中部署我的web应用程序,一切正常,但我想配置有关Jetty的日志,在服务器启动时,我看到这样的日志:

14:50:20.516 [main] DEBUG o.eclipse.jetty.webapp.WebAppContext - isSystemResource==false org.springframework.expression.spel.ast.OpDec jar:file:/C:/Mario/development/spring/spring5/workspace/springsecurity/chapter02/chapter02.00-calendar/build/exploded/WEB-INF/lib/spring-expression-4.3.11.RELEASE.jar!/org/springframework/expression/spel/ast/OpDec.class 14:50:20.516 [main] DEBUG o.e.jetty.webapp.WebAppClassLoader - WAP webapp loaded class org.springframework.expression.spel.ast.OpDec 14:50:20.516 [main] DEBUG o.eclipse.jetty.webapp.WebAppContext - isSystemResource==false org.springframework.expression.spel.ast.OperatorNot jar:file:/C:/Mario/development/spring/spring5/workspace/springsecurity/chapter02/chapter02.00-calendar/build/exploded/WEB-INF/lib/spring-expression-4.3.11.RELEASE.jar!/org/springframework/expression/spel/ast/OperatorNot.class 14:50:20.517 [main] DEBUG o.e.jetty.webapp.WebAppClassLoader - WAP webapp loaded class org.springframework.expression.spel.ast.OperatorNot 1

我想将粒度从调试更改为关于jetty server的信息


共 (1) 个答案

  1. # 1 楼答案

    jetty-logging.properties文件放在资源文件夹中,并在那里配置日志记录:

    # Configure for System.err output
    org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog
    # Configure StdErrLog to log all jetty namespace at default of WARN or above
    org.eclipse.jetty.LEVEL=INFO
    

    更多信息请点击这里:https://www.eclipse.org/jetty/documentation/9.4.x/configuring-logging.html