google-cloud-logging

Spring boot app engine logs not properly formatted

感情迁移 提交于 2020-08-06 05:44:03
问题 I've deployed a spring boot 2 application on appengine and its doing great. The only thing is that the standard logging mechanism clashes with the gcp logging system. What I get are hundred of info logs, even when there's an exception thrown or a warning. I think the problem is that the logs are really long and starts with some unnecessary data. In my configuration I use lombok+Slf4j to log inside my application, and I think logback is enabled by default since I've spring-boot-starter-web. my

Spring boot app engine logs not properly formatted

你离开我真会死。 提交于 2020-08-06 05:40:56
问题 I've deployed a spring boot 2 application on appengine and its doing great. The only thing is that the standard logging mechanism clashes with the gcp logging system. What I get are hundred of info logs, even when there's an exception thrown or a warning. I think the problem is that the logs are really long and starts with some unnecessary data. In my configuration I use lombok+Slf4j to log inside my application, and I think logback is enabled by default since I've spring-boot-starter-web. my

Spring boot app engine logs not properly formatted

旧城冷巷雨未停 提交于 2020-08-06 05:40:05
问题 I've deployed a spring boot 2 application on appengine and its doing great. The only thing is that the standard logging mechanism clashes with the gcp logging system. What I get are hundred of info logs, even when there's an exception thrown or a warning. I think the problem is that the logs are really long and starts with some unnecessary data. In my configuration I use lombok+Slf4j to log inside my application, and I think logback is enabled by default since I've spring-boot-starter-web. my

Using Python to Query GCP Stackdriver logs

让人想犯罪 __ 提交于 2020-06-15 05:59:22
问题 I am using Python3 to query Stackdriver for GCP logs. Unfortunately, the log entries that have important data are returned to me as "NoneType" instead of as a "dict" or a "str". The resulting "entry.payload" is type "None" and the "entry.payload_pb" has the data I want, but it is garbled. Is there a way to get Stackdriver to return this data in a clean format, or is there a way I can parse it? If not, is there a way I should query this data that is better than what I am doing and yields clean

Adding @google-cloud/logging in typescript functions project gives error

痞子三分冷 提交于 2020-01-24 21:53:05
问题 EDIT: for others with the same problem - using const Logging: any = require('@google-cloud/logging') together with var logger = Logging() in the body of the class worked like a charm! Remember to use var logger = Logging() to instantiate the logger library. Otherwise you will still get the logger.log is not a function ! Original post I've got a firebase functions project, written in typescript - transpiled with webpack. I'm currently trying to implement the @google-cloud/logging library, but

Logging in GCP and locally

淺唱寂寞╮ 提交于 2020-01-24 19:33:12
问题 I am building a system that is intended to run on Virtual Machines in Google Cloud Platform. However, as a form of backup, it may be run locally as well. That being said, my issue currently is with logging. I have two loggers, both work, a local logger and a cloud logger. Cloud logger import google.cloud.logging from google.cloud.logging.handlers import CloudLoggingHandler from google.oauth2 import service_account CREDS = google.cloud.logging.Client( project=PROJECT, credentials=service

Google Container Engine stdout Logs Not Showing Up

Deadly 提交于 2020-01-17 01:13:05
问题 My stdout logs are not showing up in Google Logs Viewer, or when using kubectl logs <pod> . The cluster has Cloud Logging enabled and fluentd containers are running on each node. Example Python code: logger = logging.getLogger() logger.setLevel(logging.INFO) handler = logging.StreamHandler(sys.stdout) handler.setLevel(logging.INFO) logger.addHandler(handler) logger.info("test log") The "counter-pod" example from their docs does work on my cluster, so the fluentd containers are picking up

Google App Engine why some Logs are not getting shown?

南笙酒味 提交于 2020-01-13 10:57:32
问题 In Google App Engine Flexible environment many Logs are skipping, and not getting shown in the Logging console, and it is happening always, I am checking it on Stackdriver Logging section on Google Cloud dashboard, the Logs I am showing using console.log() are getting skipped but mongoose query logs are getting printed. Also, now currently sometimes my logs console.logs are getting shown but sometimes not, but previously they were getting shown every time. Why now is it not working every time