[英]Kubernetes stackdriver log level not correct with wildfly 10
I'm still struggling with this issue and did not found the solution yet.我仍在努力解决这个问题,但还没有找到解决方案。 I use wildfly10 for deploying javaee application to k8s everything is okie but one problem about logging level .我使用 wildfly10 将 javaee 应用程序部署到 k8s 一切正常,但日志级别有一个问题。
When exception happend the stackdriver show log like the following picture.当异常发生时,stackdriver 会显示如下图所示的日志。
As you can see in that picture it throw error exception but the icon is still info.正如您在该图片中看到的那样,它会引发错误异常,但该图标仍然是信息。
Anyone has idea how to overcome this or workaround?任何人都知道如何克服这个或解决方法? Thank you very much非常感谢
Your logs are not being identified correctly that's why !!
您的日志没有被正确识别,这就是为什么!!
is not showing and you are getting Information
icon instead.未显示,您将获得Information
图标。
Error is shown if LogEntry.severity
has value of ERROR
(which is provided by the client that wrote the entry).如果LogEntry.severity
的值为ERROR
(由编写条目的客户端提供),则会显示错误。 Entries that land in Error Reporting need to meet a few other criteria: https://cloud.google.com/error-reporting/docs/formatting-error-messages进入错误报告的条目需要满足其他一些标准: https://cloud.google.com/error-reporting/docs/formatting-error-messages
You should check Reviewing logs with the Cloud Logging Logs Viewer Beta and Setting Up Error Reporting for Java .您应该检查使用 Cloud Logging Logs Viewer Beta 查看日志并设置 Java 的错误报告。
You can also take advantage of Advanced logs queries .您还可以利用高级日志查询。
An advanced logs query is a Boolean expression that specifies a subset of all the log entries in your project.高级日志查询是 Boolean 表达式,它指定项目中所有日志条目的子集。 It can be used to do any of the following:它可用于执行以下任何操作:
- Choose log entries from specific logs or log services.从特定日志或日志服务中选择日志条目。
- Choose log entries within a time range.选择时间范围内的日志条目。
- Choose log entries that satisfy conditions on metadata or user-defined fields.选择满足元数据或用户定义字段条件的日志条目。
- Choose a sampling percentage of all log entries.选择所有日志条目的采样百分比。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.