Skip to content

introduce Logging support#865

Merged
callmehiphop merged 1 commit intogoogleapis:masterfrom
stephenplusplus:spp--logging
Dec 21, 2015
Merged

introduce Logging support#865
callmehiphop merged 1 commit intogoogleapis:masterfrom
stephenplusplus:spp--logging

Conversation

@stephenplusplus
Copy link
Copy Markdown
Contributor

Fixes #842

Must Reads

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.
  }
});

@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
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

@VikramTiwari
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. 👍

@stephenplusplus
Copy link
Copy Markdown
Contributor Author

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

@stephenplusplus
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?

@stephenplusplus
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.

Comment thread lib/logging/index.js Outdated

This comment was marked as spam.

This comment was marked as spam.

Comment thread lib/logging/index.js Outdated

This comment was marked as spam.

This comment was marked as spam.

callmehiphop added a commit that referenced this pull request Dec 21, 2015
@callmehiphop callmehiphop merged commit 8db014a into googleapis:master Dec 21, 2015
@callmehiphop
Copy link
Copy Markdown
Contributor

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

sofisl pushed a commit that referenced this pull request Jan 17, 2023
sofisl pushed a commit that referenced this pull request Jan 27, 2026
sofisl pushed a commit that referenced this pull request Jan 27, 2026
sofisl pushed a commit that referenced this pull request Jan 27, 2026
sofisl pushed a commit that referenced this pull request Jan 27, 2026
sofisl pushed a commit that referenced this pull request Jan 28, 2026
sofisl pushed a commit that referenced this pull request Jan 28, 2026
sofisl pushed a commit that referenced this pull request Jan 29, 2026
sofisl pushed a commit that referenced this pull request Jan 29, 2026
sofisl pushed a commit that referenced this pull request Feb 3, 2026
* feat: allow setting BigQuery Job labels in createQueryJob method

* docs: add JSDoc for new labels parameter
GautamSharda pushed a commit that referenced this pull request Mar 5, 2026
GautamSharda pushed a commit that referenced this pull request Mar 11, 2026
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
🤖 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).
feywind pushed a commit that referenced this pull request Mar 27, 2026
🤖 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

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants