You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>**This is a Beta release of Google Cloud Logging.** This API is not covered by any SLA or deprecation policy and may be subject to backward-incompatible changes.
394
+
395
+
- [API Documentation][gcloud-logging-docs]
396
+
- [Official Documentation][cloud-logging-docs]
397
+
398
+
```js
399
+
// Authenticating on a global-basis. You can also authenticate on a per-API-
400
+
// basis (see Authentication section above).
401
+
402
+
var gcloud = require('gcloud')({
403
+
projectId: 'my-project',
404
+
keyFilename: '/path/to/keyfile.json'
405
+
});
406
+
407
+
var logging = gcloud.logging();
408
+
409
+
// Create a sink using a Bucket as a destination.
410
+
var gcs = gcloud.storage();
411
+
412
+
logging.createSink('my-new-sink', {
413
+
destination: gcs.bucket('my-sink')
414
+
}, function(err, sink) {});
415
+
416
+
// Write a critical entry to a log.
417
+
var syslog = logging.log('syslog');
418
+
419
+
var resource = {
420
+
type: 'gce_instance',
421
+
labels: {
422
+
zone: 'global',
423
+
instance_id: 3
424
+
}
425
+
};
426
+
427
+
var entry = syslog.entry(resource, {
428
+
delegate: process.env.user
429
+
});
430
+
431
+
syslog.critical(entry, function(err) {});
432
+
433
+
// Get all entries in your project.
434
+
logging.getEntries(function(err, entries) {
435
+
if (!err) {
436
+
// `entries` contains all of the entries from the logs in your project.
437
+
}
438
+
});
388
439
```
389
440
390
441
391
442
## Google Cloud Resource Manager (Beta)
392
443
393
-
> This is a *Beta* release of Google Cloud Resource Manager. This feature is not covered by any SLA or deprecation policy and may be subject to backward-incompatible changes.
444
+
>**This is a Beta release of Google Cloud Resource Manager.** This feature is not covered by any SLA or deprecation policy and may be subject to backward-incompatible changes.
> This is an *Alpha* release of Google Cloud Search. This feature is not covered by any SLA or deprecation policy and may be subject to backward-incompatible changes.
480
+
>**This is an Alpha release of Google Cloud Search.** This feature is not covered by any SLA or deprecation policy and may be subject to backward-incompatible changes.
430
481
431
482
- [API Documentation][gcloud-search-docs]
432
483
- [Official Documentation][cloud-search-docs]
@@ -485,6 +536,7 @@ Apache 2.0 - See [COPYING](COPYING) for more information.
<strong>This is a Beta release of Google Cloud Logging.</strong> This API is not covered by any SLA or deprecation policy and may be subject to backward-incompatible changes.
4
+
</p>
5
+
<p>
6
+
The <code>gcloud.logging</code> method will return a <code>logging</code> object, allowing you to create sinks, write log entries, and more.
7
+
</p>
8
+
<p>
9
+
To learn more about Logging, see the <ahref="https://cloud.google.com/logging/docs">What is Google Cloud Logging?</a>
0 commit comments