question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

View Stackdriver logs

See original GitHub issue

Expected Behavior

clasp logs
(DEBUG) {foo:42} – myFunction [2018-02-21T16:08:06.364Z]
clasp logs --json
[{
  "jsonPayload": {foo:42},
  ...
}, {...}]

Views StackDriver logs (console.log).

Actual Behavior

Command doesn’t exist yet.

Notes

Example Stackdriver API result

{
  "insertId": "13oj0ajfyb6tdx",
  "jsonPayload": {foo:42},
  "labels": {…},
  "logName": "projects/project-id-4088669541713651222/logs/script.googleapis.com%2Fconsole_logs",
  "receiveTimestamp": "2018-02-21T16:08:07.370458993Z",
  "resource": {
    "labels": {
      "function_name": "myFunction",
      "invocation_type": "editor",
      "project_id": "project-id-4088669541713651222",
    },
    "type": "app_script_function"
  },
  "severity": "DEBUG",
  "timestamp": "2018-02-21T16:08:06.364Z",
}

Please 👍 if you’d like this feature.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
campionfellincommented, Apr 3, 2018

Ok, I’ll assume for now that it’s already in the .clasp.json file, with instructions to the user to modify that file.

In the README instructions, we should mention that you can find your projectId by following these instructions: https://developers.google.com/apps-script/guides/cloud-platform-projects#accessing_an_apps_script_cloud_platform_project

However, it’s important to note that this is a hidden GCP project, and is only used for the Apps Script. If they want to connect it to another project they can follow the instructions a little lower on that page as well.

+1 to “Ideally, the API would give us the Cloud projectId for the Project”. Since it doesn’t for now, I think updating the README with how to find it and where to put it would be best.

0reactions
grantcommented, Apr 9, 2018

Fixed with #101.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Viewing Stackdriver logs - Migrate for Compute Engine
Sign in to your Manager · Click System Settings · Click the Logs tab · Copy the System ID (for example QWEX1234) on...
Read more >
Stackdriver Logging and Monitoring Usage | by Tarun Manrai
Stackdriver Logging provides detailed list of logs, current log volume and projected monthly volume. This makes it easy to see which logs have...
Read more >
Stackdriver logs | Google Maps Booking API
To view the log history, follow these steps: In the Google Cloud Platform Console, go to Stackdriver > Logging > Logs. Select your...
Read more >
Google Cloud Logging - Stackdriver
Cloud Logging is a service for storing, viewing and interacting with logs. Answers the questions “Who did what, where and when” within the...
Read more >
Cloud logging - YouTube
30K views 2 years ago Google Cloud Essentials ... to learn more about our products → https://goo.gle/GCP Product: Stackdriver Logging ; ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found