Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logs displayed as ERROR in Log Viewer #823

Open
Emixam23-FCMS opened this issue Dec 8, 2020 · 1 comment
Open

Logs displayed as ERROR in Log Viewer #823

Emixam23-FCMS opened this issue Dec 8, 2020 · 1 comment

Comments

@Emixam23-FCMS
Copy link

Hii,

We have this configuration:

- name: ep
          image: gcr.io/endpoints-release/endpoints-runtime:1.53.0
          args: [
            "-n", "/etc/nginx/custom/nginx_gin.conf",
            "-p", "{{ .Values.service.port }}",
            "-S", "{{ .Values.service.targetPort }}",
            "-a", "127.0.0.1:XXXX",
            "-s", "{{.Values.endpointsServiceName}}",
            "-R", "managed"
          ]
          resources:
            requests:
              cpu: XXXX
          ports:
            - name: https
              containerPort: {{ .Values.service.targetPort }}
          livenessProbe:
            tcpSocket:
              port: {{ .Values.service.targetPort }}
            initialDelaySeconds: 5
          readinessProbe:
            tcpSocket:
              port: {{ .Values.service.targetPort }}
            initialDelaySeconds: 1
          volumeMounts:
            - name: tls-secret
              mountPath: /etc/nginx/ssl
              readOnly: true
            - name: config-map
              mountPath: /etc/nginx/custom
              readOnly: true

And the thing is, we get the logs as ERROR and we can't understand why:

Error 2020-12-07 18:01:14.416 UTC+1 INFO: Fetching an access token from the metadata service
Error 2020-12-07 18:01:14.420 UTC+1 INFO: Fetching the service config ID from the rollouts service
Error 2020-12-07 18:01:15.100 UTC+1 INFO: Fetching the service configuration from the service management service
Error 2020-12-07 18:01:15.815 UTC+1 INFO: Attribute zone: XXXXXXXXXX
Error 2020-12-07 18:01:15.820 UTC+1 INFO: Attribute project_id: XXXXXXXXXX
Error 2020-12-07 18:01:15.826 UTC+1 INFO: Attribute kube_env: KUBE_ENV
Error 2020-12-07 18:01:15.859 UTC+1 nginx: [warn] Using trusted CA certificates file: /XXXXXXXXXX/trusted-ca-certificates.crt

Any idea? Thanks

@nareddyt
Copy link
Contributor

nareddyt commented Dec 8, 2020

Yes, this is a known issue. Unfortunately Google Cloud Logging does not understand the log format that ESP produces application logs in. Since ESP logs to stderr, Google Cloud Logging assumes all logs are ERROR level.

I agree it's not the best experience, but you should be able to add filters in Google Cloud Logging to only see log messages that actually contain the text "INFO", "ERROR", etc.

FYI: We solved this issue in ESPv2, all the application logs are in glog format. Google Cloud Logging understands this format for GCE and GKE compute platforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants