Skip to content

Commit

Permalink
Merge pull request #6 from mlazarov/api-change-prp
Browse files Browse the repository at this point in the history
preparatory: update for breaking gcloud API change
  • Loading branch information
mlazarov authored Nov 29, 2016
2 parents dcdb764 + 9415b08 commit 388f4c5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions lib/bunyan-stackdriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,13 @@ BunyanStackDriver.prototype._write = function write(record, encoding, callback)
record = destroyCircular(record);
strictJSON(record);

var entry = this.log.entry(this.resource, record);
var metadata = {
resource: this.resource,
timestamp: timestamp,
severity: mapLevelToSeverity[nameFromLevel[record.level]] || 'DEFAULT'
};

// There are no public APIs for this yet:
// https://github.com/GoogleCloudPlatform/gcloud-node/issues/1348
entry.timestamp = timestamp;
entry.severity = mapLevelToSeverity[nameFromLevel[record.level]] || 'DEFAULT';
var entry = this.log.entry(metadata, record);

this.entryQueue.push(entry);

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bunyan-stackdriver",
"version": "1.2.1",
"version": "1.2.2",
"description": "StackDriver stream for Bunyan",
"main": "./lib/bunyan-stackdriver",
"repository": {
Expand All @@ -21,7 +21,7 @@
},
"homepage": "https://github.com/mlazarov/bunyan-stackdriver",
"dependencies": {
"@google-cloud/logging": "^0.1.1",
"@google-cloud/logging": "^0.5.0",
"destroy-circular": "^1.1.0"
},
"devDependencies": {
Expand Down

0 comments on commit 388f4c5

Please sign in to comment.