Releases: googleapis/nodejs-logging
Releases · googleapis/nodejs-logging
@google-cloud/logging v0.9.0
@google-cloud/logging v0.8.0
Features
insertId
properties are automatically assigned on log entries to preserve ordering. (#2021)
@google-cloud/logging v0.7.1
@google-cloud/logging v0.6.0
- Auto-detect
projectId
. See Authentication for more. (#1656) - Log entries are automatically decorated with a default resource object. (#1808)
- Log entries are assigned a timestamp at the time the object is created. (#1815)
@google-cloud/logging v0.5.0
@google-cloud/logging v0.4.0
⚠️ Breaking Changes
Promises have arrived!
It's been a long time coming, but we're finally here. We've shipped promise support in the Stackdriver Logging module!
Do I have to use promises?
Nope, carry on. (But keep reading if you use streams)
How do I use promises?
Don't pass a callback:
var logging = require('@google-cloud/logging')();
logging.getEntries()
.then(function(data) {
var entities = data[0];
})
.catch(function(err) {});
How do I use a method as a stream?
All of the streaming functionality from our methods have been moved to their own method.
var logging = require('@google-cloud/logging')();
- logging.getEntries()
+ logging.getEntriesStream()
.on('data', function(entry) {})
- logging.getSinks()
+ logging.getSinksStream()
.on('data', function(sink) {})
var log = logging.log('syslog');
- log.getEntries()
+ log.getEntriesStream()
.on('data', function(entry) {})
@google-cloud/logging v0.3.0
- Sync dependencies with other service modules to minimize download and installation time as much as possible. (#1605)