简体   繁体   English

Kubernetes 堆栈驱动程序日志级别与 Wildfly 10 不正确

[英]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.

相关问题 如何将kubernetes容器日志文件转发到Stackdriver? - How to forward a kubernetes container log file into Stackdriver? 如何在Google Cloud的Stackdriver中获取kubernetes容器日志文件的内容? - How to get content of a kubernetes container log files in the Stackdriver in google cloud? 使用Stackdriver在Kubernetes集群中使用日志自定义Docker容器 - Custom docker container in Kubernetes cluster with log using Stackdriver 未在App Engine Flex(节点)中设置Google Stackdriver日志级别 - Google Stackdriver Log Level not set in App Engine Flex (Node) Stackdriver中的日志级别 - Log levels in Stackdriver Google Stackdriver未按照预期从Google Kubernetes Engine显示结构条目日志 - Google Stackdriver not showing struct entry log as expected from Google Kubernetes Engine 在服务器中打印 IP 地址。 Wildfly 10 服务器的日志 - Print IP address in Server. Log for wildfly 10 server log4j 2中不同级别的日志未显示正确的日志 - different level of log in log4j 2 are not showing correct log 如何在 Wildfly Standalone.xml 中将不同的日志级别记录到同一类别的不同日志文件中? - How to log different log level to different log file from the same category in Wildfly standalone.xml? Stackdriver Logging错过了日志条目 - Stackdriver logging misses log entries
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM