如何停止 var/log/messages 文件中的 Spring boot 应用程序控制台日志

发布于 01-14 18:32 字数 142 浏览 4 评论 0原文

我们使用 spring boot 和 log4j2 进行日志记录。我们已经指定了日志路径并且它正在工作。但相同的控制台日志正在移动到 var/log/messages 文件

有人可以帮助我如何停止在 var/log/messages 文件中记录控制台日志。

We're using spring boot and log4j2 for logging. We have specified the log path and it is working. But the same console logs are moving to var/log/messages file

Can someone please help me how to stop logging console logs in var/log/messages file.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

々眼睛长脚气2025-01-21 18:32:46

我们在这里遇到了同样的问题,解决方案是在 application.properties 文件中添加以下参数:

logging.pattern.console=

Leaving 'blank' will stop thelogging

/var/log/messages

更多详细信息 此处

we had the same problem here, and the solution was add the following parameter on the application.properties file:

logging.pattern.console=

Leaving 'blank' will stop the logging on

/var/log/messages

More details Here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文