GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — introduce Logging support by stephenplusplus · Pull Request #865 · googleapis/google-cloud-node

Conversation

@stephenplusplus

@stephenplusplus stephenplusplus commented Sep 15, 2015

Copy link
Copy Markdown
Contributor

Fixes #842

Must Reads

  • Introduction to the Cloud Logging API: https://cloud.google.com/logging/docs/api/
  • Docs: https://stephenplusplus.github.io/gcloud-node/#/docs/master/logging

To Dos

  • Make sure ACLs are properly set for Topics: introduce Logging support #865 (comment)
  • Enable Cloud Logging API on System Test Account
  • Document createSink.config.filter
  • Inherit from Service / ServiceObject
  • Support Sink destinations
    • Storage Bucket
    • BigQuery Dataset
    • Pub/Sub Topic
  • Docs
    • Readme
    • JSDocs
    • Site
  • Tests
    • System
    • Unit
      • Index
      • Log
      • Sink

Preview

// Authenticating on a global-basis. You can also authenticate on a per-API-
// basis (see Authentication section above).
var gcloud = require('gcloud')({
  projectId: 'my-project',
  keyFilename: '/path/to/keyfile.json'
});

var logging = gcloud.logging();

// Create a sink using a Bucket as a destination.
var gcs = gcloud.storage();

logging.createSink('my-new-sink', {
  destination: gcs.bucket('my-sink')
}, function(err, sink) {});

// Write a critical entry to a log.
var syslog = logging.log('syslog');

var resource = {
  type: 'gce_instance',
  labels: {
    zone: 'global',
    instance_id: 3
  }
};

var entry = syslog.entry(resource, {
  delegate: process.env.user
});

syslog.critical(entry, function(err) {});

// Get all entries in your project.
logging.getEntries(function(err, entries) {
  if (!err) {
    // `entries` contains all of the entries from the logs in your project.
  }
});

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@stephenplusplus stephenplusplus added don't merge api: logging Issues related to the Cloud Logging API. labels Sep 15, 2015
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Sep 15, 2015
@stephenplusplus
stephenplusplus force-pushed the spp--logging branch 2 times, most recently from 6fc0d0a to 02f18aa Compare September 16, 2015 17:25
@stephenplusplus stephenplusplus added the status: blocked Resolving the issue is dependent on other work. label Oct 1, 2015
@stephenplusplus
stephenplusplus force-pushed the spp--logging branch 2 times, most recently from 769488e to b782682 Compare October 20, 2015 14:47
@stephenplusplus stephenplusplus removed the status: blocked Resolving the issue is dependent on other work. label Oct 20, 2015
@stephenplusplus
stephenplusplus force-pushed the spp--logging branch 2 times, most recently from 01fb9f7 to 5e7faac Compare October 20, 2015 16:35
@stephenplusplus
stephenplusplus force-pushed the spp--logging branch 8 times, most recently from 6c68dba to b29cd90 Compare November 17, 2015 17:17
@stephenplusplus

stephenplusplus commented Nov 17, 2015

Copy link
Copy Markdown
Contributor Author

@VikramTiwari - your thoughts are most welcome if you have the chance to play around with this!

$ npm install --save stephenplusplus/gcloud-node#spp--logging
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@VikramTiwari

VikramTiwari commented Nov 17, 2015

Copy link
Copy Markdown

Hey @stephenplusplus I am at Chrome Dev Summit for today and tomorrow, but I will be testing it by the end of week for sure. 👍

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stephenplusplus

stephenplusplus commented Nov 17, 2015

Copy link
Copy Markdown
Contributor Author

@VikramTiwari awesome! I'll look for you on the feed 🌠

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stephenplusplus
stephenplusplus force-pushed the spp--logging branch from b29cd90 to 4c8a3b6 Compare November 19, 2015 15:49
@stephenplusplus

stephenplusplus commented Nov 19, 2015

Copy link
Copy Markdown
Contributor Author

@jgeewax to prepare for this to merge, can you check that the Logging API is enabled for the Travis project?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stephenplusplus

stephenplusplus commented Nov 19, 2015

Copy link
Copy Markdown
Contributor Author

Also, any ideas for getting Travis to auth as a user? Many of our system tests require user-level, non-service account auth.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stephenplusplus
stephenplusplus force-pushed the spp--logging branch from 4c8a3b6 to 8ea3d82 Compare November 25, 2015 16:56
@stephenplusplus stephenplusplus mentioned this pull request Nov 30, 2015
[Feature] gcloud-logging #842
Closed
@stephenplusplus
stephenplusplus force-pushed the spp--logging branch from 8ea3d82 to 3100170 Compare November 30, 2015 16:50
filipjs
filipjs reviewed Dec 3, 2015
View reviewed changes
Comment thread lib/logging/index.js Outdated

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stephenplusplus stephenplusplus added the don't merge label Dec 18, 2015
@stephenplusplus
stephenplusplus force-pushed the spp--logging branch from 22cd2a8 to e7e52a4 Compare December 18, 2015 15:19
filipjs
filipjs reviewed Dec 21, 2015
View reviewed changes
Comment thread lib/logging/index.js Outdated

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stephenplusplus
introduce Logging support
ef51f55
@stephenplusplus
stephenplusplus force-pushed the spp--logging branch from e7e52a4 to ef51f55 Compare December 21, 2015 15:37
@stephenplusplus stephenplusplus removed the don't merge label Dec 21, 2015
callmehiphop added a commit that referenced this pull request Dec 21, 2015
@callmehiphop
Merge pull request #865 from stephenplusplus/spp--logging
8db014a
introduce Logging support
@callmehiphop
callmehiphop merged commit 8db014a into googleapis:master Dec 21, 2015
@callmehiphop

callmehiphop commented Dec 21, 2015

Copy link
Copy Markdown
Contributor

Thanks @stephenplusplus! Also, thanks for the review @filipjs!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stephenplusplus stephenplusplus mentioned this pull request Dec 22, 2015
Enable Logging tests for Travis #1038
Closed
@sofisl sofisl mentioned this pull request Nov 11, 2022
migrate code from googleapis/nodejs-dialogflow #3546
Merged
4 tasks
sofisl pushed a commit that referenced this pull request Nov 11, 2022
@release-please
chore: release 4.3.1 (#865)
8de8ea3
🤖 I have created a release \*beep\* \*boop\*
---
### [4.3.1](https://www.github.com/googleapis/nodejs-dialogflow/compare/v4.3.0...v4.3.1) (2021-08-17)


### Bug Fixes

* **deps:** google-gax v2.24.1 ([#864](https://www.github.com/googleapis/nodejs-dialogflow/issues/864)) ([6646fb3](https://www.github.com/googleapis/nodejs-dialogflow/commit/6646fb35de95b2933adad91a4a111ee0dfd37ce9))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
@sofisl sofisl mentioned this pull request Jan 17, 2023
migrate code from googleapis/nodejs-vision #3860
Merged
4 tasks
sofisl pushed a commit that referenced this pull request Jan 17, 2023
@renovate-bot
fix(deps): update dependency natural to v3 (#865)
e92c149
miguelvelezsa pushed a commit that referenced this pull request Jul 23, 2025
@release-please
chore: release 2.6.3 (#865)
e83b01a
🤖 I have created a release \*beep\* \*boop\* 
---
### [2.6.3](https://www.github.com/googleapis/gax-nodejs/compare/v2.6.2...v2.6.3) (2020-07-09)


### Bug Fixes

* typeo in nodejs .gitattribute ([#864](https://www.github.com/googleapis/gax-nodejs/issues/864)) ([6ae74a9](https://www.github.com/googleapis/gax-nodejs/commit/6ae74a94a6e5b6726459e436783e64bcdd287469))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please).
sofisl pushed a commit that referenced this pull request Jan 27, 2026
@psx95
build: replace wget with pre-installed curl (#865)
39d5071
sofisl pushed a commit that referenced this pull request Jan 27, 2026
@psx95
build: replace wget with pre-installed curl (#865)
6be0a6b
sofisl pushed a commit that referenced this pull request Jan 27, 2026
@psx95
build: replace wget with pre-installed curl (#865)
eacffc8
sofisl pushed a commit that referenced this pull request Jan 27, 2026
@psx95
build: replace wget with pre-installed curl (#865)
a673d2c
sofisl pushed a commit that referenced this pull request Jan 28, 2026
@psx95
build: replace wget with pre-installed curl (#865)
dc39d8b
sofisl pushed a commit that referenced this pull request Jan 28, 2026
@psx95
build: replace wget with pre-installed curl (#865)
bafe243
sofisl pushed a commit that referenced this pull request Jan 29, 2026
@psx95
build: replace wget with pre-installed curl (#865)
2aa17ff
sofisl pushed a commit that referenced this pull request Jan 29, 2026
@psx95
build: replace wget with pre-installed curl (#865)
3084cbf
sofisl pushed a commit that referenced this pull request Feb 3, 2026
@benbirt
feat: allow setting BigQuery Job labels in createQueryJob method (#865)
d6578fa
* feat: allow setting BigQuery Job labels in createQueryJob method

* docs: add JSDoc for new labels parameter
@GautamSharda GautamSharda mentioned this pull request Feb 5, 2026
Enable Request Bundling using asynchronous context tracking #7175
Open
GautamSharda pushed a commit that referenced this pull request Mar 5, 2026
@release-please
chore: release 8.0.2 (#865)
5993bd6
GautamSharda pushed a commit that referenced this pull request Mar 11, 2026
@stayradiated Benjamin E. Coe @feywind
feat(subscription): support oidcToken (#865)
a9fa27f
Co-authored-by: Benjamin E. Coe <[email protected]>
Co-authored-by: Megan Potter <[email protected]>
GautamSharda pushed a commit that referenced this pull request Mar 11, 2026
@gcf-merge-on-green
chore: release 1.6.0 (#880)
32319f4
🤖 I have created a release \*beep\* \*boop\* 
---
## [1.6.0](https://www.github.com/googleapis/nodejs-pubsub/compare/v1.5.0...v1.6.0) (2020-03-04)


### Features

* **subscription:** support oidcToken ([#865](https://www.github.com/googleapis/nodejs-pubsub/issues/865)) ([a786ca0](https://www.github.com/googleapis/nodejs-pubsub/commit/a786ca00bd27a6e098125d6b7b87edb11ea6ea0f))
* export protos in src/index.ts ([f32910c](https://www.github.com/googleapis/nodejs-pubsub/commit/f32910c3a7da5ce268084d7294094912ab696034))


### Bug Fixes

* **deps:** update to the latest google-gax to pull in grpc-js 0.6.18 ([#903](https://www.github.com/googleapis/nodejs-pubsub/issues/903)) ([78bd9e9](https://www.github.com/googleapis/nodejs-pubsub/commit/78bd9e97a913b5e2aa457c2a28fd849f67bf225e))
* send the ITimestamp protobuf to Pub/Sub for seeking, not JavaScript Date() ([#908](https://www.github.com/googleapis/nodejs-pubsub/issues/908)) ([0c1d711](https://www.github.com/googleapis/nodejs-pubsub/commit/0c1d711854d7397a0fc4d6e84ed090984a6e05dc))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please).
@GautamSharda GautamSharda mentioned this pull request Mar 11, 2026
migrate code from googleapis/nodejs-pubsub #7592
Merged
4 tasks
feywind pushed a commit that referenced this pull request Mar 27, 2026
@gcf-merge-on-green
chore: release 1.6.0 (#880)
b13c9d3
🤖 I have created a release \*beep\* \*boop\* 
---
## [1.6.0](https://www.github.com/googleapis/nodejs-pubsub/compare/v1.5.0...v1.6.0) (2020-03-04)


### Features

* **subscription:** support oidcToken ([#865](https://www.github.com/googleapis/nodejs-pubsub/issues/865)) ([a786ca0](https://www.github.com/googleapis/nodejs-pubsub/commit/a786ca00bd27a6e098125d6b7b87edb11ea6ea0f))
* export protos in src/index.ts ([f32910c](https://www.github.com/googleapis/nodejs-pubsub/commit/f32910c3a7da5ce268084d7294094912ab696034))


### Bug Fixes

* **deps:** update to the latest google-gax to pull in grpc-js 0.6.18 ([#903](https://www.github.com/googleapis/nodejs-pubsub/issues/903)) ([78bd9e9](https://www.github.com/googleapis/nodejs-pubsub/commit/78bd9e97a913b5e2aa457c2a28fd849f67bf225e))
* send the ITimestamp protobuf to Pub/Sub for seeking, not JavaScript Date() ([#908](https://www.github.com/googleapis/nodejs-pubsub/issues/908)) ([0c1d711](https://www.github.com/googleapis/nodejs-pubsub/commit/0c1d711854d7397a0fc4d6e84ed090984a6e05dc))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

api: logging Issues related to the Cloud Logging API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@stephenplusplus @VikramTiwari @filipjs @callmehiphop @jgeewax @googlebot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.