Skip to content

Commit e404785

Browse files
authored
Switch to individual API packages. (#169)
* Switch to individual API packages. * Address comments * Address comments
1 parent b028bb8 commit e404785

4 files changed

Lines changed: 26 additions & 26 deletions

File tree

handwritten/logging-winston/samples/export.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
'use strict';
1515

1616
// [START setup]
17-
// By default, gcloud will authenticate using the service account file specified
18-
// by the GOOGLE_APPLICATION_CREDENTIALS environment variable and use the
19-
// project specified by the GCLOUD_PROJECT environment variable. See
20-
// https://googlecloudplatform.github.io/gcloud-node/#/docs/guides/authentication
21-
var gcloud = require('gcloud');
17+
// By default, the client will authenticate using the service account file
18+
// specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable and use
19+
// the project specified by the GCLOUD_PROJECT environment variable. See
20+
// https://googlecloudplatform.github.io/gcloud-node/#/docs/google-cloud/latest/guides/authentication
21+
var Logging = require('@google-cloud/logging');
2222

23-
// Get a reference to the logging component
24-
var logging = gcloud.logging();
23+
// Instantiate a logging client
24+
var logging = Logging();
2525
// [END setup]
2626

2727
// [START listSinks]

handwritten/logging-winston/samples/list.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515

1616
// [START list]
1717
// [START auth]
18-
// By default, gcloud will authenticate using the service account file specified
19-
// by the GOOGLE_APPLICATION_CREDENTIALS environment variable and use the
20-
// project specified by the GCLOUD_PROJECT environment variable. See
21-
// https://googlecloudplatform.github.io/gcloud-node/#/docs/guides/authentication
22-
var gcloud = require('gcloud');
23-
24-
// Get a reference to the logging component
25-
var logging = gcloud.logging();
18+
// By default, the client will authenticate using the service account file
19+
// specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable and use
20+
// the project specified by the GCLOUD_PROJECT environment variable. See
21+
// https://googlecloudplatform.github.io/gcloud-node/#/docs/google-cloud/latest/guides/authentication
22+
var Logging = require('@google-cloud/logging');
23+
24+
// Instantiate a logging client
25+
var logging = Logging();
2626
// [END auth]
2727

2828
/**

handwritten/logging-winston/samples/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
"system-test": "mocha -R spec -t 120000 --require intelli-espower-loader ../system-test/_setup.js system-test/*.test.js"
1010
},
1111
"dependencies": {
12-
"async": "^1.5.2",
12+
"@google-cloud/logging": "^0.1.1",
13+
"async": "^2.0.1",
1314
"express": "^4.13.4",
14-
"fluent-logger": "^1.1.1",
15-
"gcloud": "^0.37.0"
15+
"fluent-logger": "^2.0.1"
1616
},
1717
"devDependencies": {
18-
"mocha": "^2.5.3"
18+
"mocha": "^3.0.2"
1919
}
2020
}

handwritten/logging-winston/samples/write.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ var async = require('async');
1818

1919
// [START write]
2020
// [START setup]
21-
// By default, gcloud will authenticate using the service account file specified
22-
// by the GOOGLE_APPLICATION_CREDENTIALS environment variable and use the
23-
// project specified by the GCLOUD_PROJECT environment variable. See
24-
// https://googlecloudplatform.github.io/gcloud-node/#/docs/guides/authentication
25-
var gcloud = require('gcloud');
21+
// By default, the client will authenticate using the service account file
22+
// specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable and use
23+
// the project specified by the GCLOUD_PROJECT environment variable. See
24+
// https://googlecloudplatform.github.io/gcloud-node/#/docs/google-cloud/latest/guides/authentication
25+
var Logging = require('@google-cloud/logging');
2626

27-
// Get a reference to the logging component
28-
var logging = gcloud.logging();
27+
// Instantiate a logging client
28+
var logging = Logging();
2929
// [END setup]
3030

3131
/**

0 commit comments

Comments
 (0)