如何在 Quarkus 中设置日志记录级别? [英] How do I set the logging level in Quarkus?

查看:170
本文介绍了如何在 Quarkus 中设置日志记录级别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想更改 Quarkus 应用程序的日志记录级别.

I would like to change the logging level of my Quarkus application.

如何从配置文件或在运行时执行此操作?

How can I do that either from the configuration file or at runtime?

推荐答案

控制根日志级别的属性是 quarkus.log.level(默认为 INFO).

The property that controls the root logging level is quarkus.log.level (and defaults to INFO).

此属性可以在 application.properties 中设置,也可以在运行时使用 -Dquarkus.log.level=DEBUG 覆盖.

This property can be set either in application.properties or can be overridden at runtime using -Dquarkus.log.level=DEBUG.

您还可以使用 quarkus.log.category 指定更细粒度的日志记录.

You can also specify more fine grained logging using quarkus.log.category.

例如对于 RESTEasy,您可以设置:

For example for RESTEasy you could set:

quarkus.log.category."org.jboss.resteasy".level=DEBUG

有关登录 Quarkus 的更多信息,请查看指南.

For more information about logging in Quarkus, please check this guide.

这篇关于如何在 Quarkus 中设置日志记录级别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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