Questions tagged [google-cloud-logging]

Google Cloud Logging collects and stores logs from applications and services on the Google Cloud Platform

Introduction

Google Cloud Logging collects and stores logs from applications and services on the Google Cloud Platform:

  • View your logs with the Logs Viewer.
  • Export your logs to Google Cloud Storage, Google BigQuery, or Google Cloud Pub/Sub.
  • Integrate third-party logs from your virtual machine instances by installing the logging agent, google-fluentd.

Cloud Logging saves metadata with every log entry so that you can tell when the log entry was created, from what resource or instance it came, what its severity level is, and so forth. The log entry's original content, or payload, might be saved as a text string or as a structured object, depending on the log type.

Official documentation

622 questions
3
votes
1 answer

How to see Google Cloud Compute Engine Logs

How can I see the logs regarding the VMs that has been created on Google Cloud Compute Engine ?
3
votes
1 answer

Is there a way to feed GCP logging a JSON payload such that it grabs the level and timestamp from the payload?

I am creating a log receiver, which will receive the logging output of another go program, do some filtering and then directly POST to GCP logging. The logging received are pure JSON entries. I'd rather avoid a JSON marshall if I can. Just adding…
Kevin Buchs
  • 2,520
  • 4
  • 36
  • 55
3
votes
2 answers

Severities of all logs on AI Platform are errors

On Google AI Platform, all logs printed on stderr are interpreted as ERROR. Is there any way to print logs as INFO, WARNING, and CRITICAL?
3
votes
2 answers

BigQuery - How to see failed scheduled queries in Cloud Logging?

I would like to monitor the state of my BigQuery scheduled queries in a Cloud Monitoring dashboard. I have created several logs-based metrics to track errors in other services/resources, but having trouble finding any indication of scheduled query…
3
votes
0 answers

How to redirect abseil logging messages to stackdriver using google.cloud.logging without having duplicate with wrong "label"?

I am using AI Platform training to run ML training job using python 3.7.6. I am using the abseil module for logging messages with absl-py 0.9.0. I look at the instruction on how to direct python logging messages to stackdriver configuration medium…
3
votes
1 answer

Use logs severity with Google Compute Engine and the Cloud Logging agent

I'd like to use logs severity with the Google Cloud Logging agent and a linux (Debian) VM running on Compute Engine. The Compute Engine instance is a debian-9 n2-standard-4 machine. I've installed the Cloud Logging agent by following the…
3
votes
0 answers

How to log stackdriver entries using stackdriver logging nodejs lib @google-cloud/logging

I am using protractor having Jasmine where I intergrated stackdriver lib @google-cloud/logging. When I run this lib, I get entryId however I dont see logs in stackdriver. I debug the issues and seems like some issues with async-await…
Gaurav
  • 31
  • 3
3
votes
1 answer

Logging in GCP and locally

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…
3
votes
2 answers

Logging on either GCP or local

Suppose there is a system that is run on GCP, but as a backup, can be run locally. When running on the cloud, stackdriver is pretty straightforward. However, I need my system to push to stackdriver if on the cloud, and if not on the cloud, use the…
3
votes
1 answer

Logging to App Engine request_log through Logback

I've got an app built on the Ninja Framework using App Engine Standard Environment - Java 11, using the injected Logger that comes with Ninja, which is Apache Logback. Normally, this logs to the stdout of the instance, so all my messages come in…
3
votes
1 answer

Monitor and Alert on Cloud Build errors with Stackdriver

I'm looking for an option to monitor and create alerts whenever a Cloud Build fail - using Stackdriver. Lots of people are solving this using Pub/Sub and Cloud Functions (example) but I perfer to have all monitoring/alerting within Stackdriver.…
3
votes
2 answers

Need to get time data about since when the instance was last stopped in gcp

I want to get data on the stop time of an instance in gcp. i.e. since when an instance is stopped. I want to implement it in a script to use it further and move the server to snapshot. Can anyone help me with how to get this data from gcp either…
3
votes
1 answer

Try this API for Logging API returns "PERMISSION_DENIED"

I am trying to test the Google Cloud Logging API on the "Try this API" feature that Google Cloud Platform has on their documentation, but I get this response back: { "error": { "code": 403, "message": "The caller does not have…
3
votes
1 answer

Using YAML file to setup GCP Cloud Logging

I have the following YAML file setup for my logger in my project: --- version: 1 disable_existing_loggers: False formatters: simple: format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s" colored: (): "colorlog.ColoredFormatter" …
GHETTO.CHiLD
  • 3,267
  • 1
  • 22
  • 34
3
votes
2 answers

How to log a error to Stackdriver Error Reporting via Stackdriver Logging in Python

I've been using Stackdriver Logging for a long time and now I'd like to also take advantage of Error Reporting. I'd prefer to use Python's logging mechanism and scrape exceptions out of a log file if possible (for various reasons) rather than using…