-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slight refactor of logging samples. #199
Conversation
// Get a reference to an existing log | ||
var log = logging.log(options.name); | ||
|
||
function writeLogEntryAdvanced (logName, options, callback) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we have logName
and options
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Required things go into positional arguments, optional stuff into an options
argument.
// Ignore "Not Found" error | ||
if (err && err.code !== 404) { | ||
assert.ifError(err); | ||
assert(apiResponse); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this 'naked assert'? e.g.
assert.notEqual(apiResponse, null)
LGTM, assuming the naked asserts aren't an issue (or will be resolved in a separate PR). |
Current coverage is 89.20% (diff: 100%)@@ master #199 diff @@
==========================================
Files 57 57
Lines 2382 2399 +17
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 2123 2140 +17
Misses 259 259
Partials 0 0
|
🤖 I have created a release \*beep\* \*boop\* --- ### [2.1.1](https://www.github.com/googleapis/nodejs-datalabeling/compare/v2.1.0...v2.1.1) (2020-07-10) ### Bug Fixes * typeo in nodejs .gitattribute ([#198](https://www.github.com/googleapis/nodejs-datalabeling/issues/198)) ([494d94c](https://www.github.com/googleapis/nodejs-datalabeling/commit/494d94c6baafe7626feb4eb611e09eb25f7936f2)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please).
🤖 I have created a release \*beep\* \*boop\* --- ### [2.1.1](https://www.github.com/googleapis/nodejs-datalabeling/compare/v2.1.0...v2.1.1) (2020-07-10) ### Bug Fixes * typeo in nodejs .gitattribute ([#198](https://www.github.com/googleapis/nodejs-datalabeling/issues/198)) ([494d94c](https://www.github.com/googleapis/nodejs-datalabeling/commit/494d94c6baafe7626feb4eb611e09eb25f7936f2)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please).
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* updated CHANGELOG.md * updated package.json * updated samples/package.json
* updated CHANGELOG.md * updated package.json * updated samples/package.json
* updated CHANGELOG.md * updated package.json * updated samples/package.json
* updated CHANGELOG.md * updated package.json * updated samples/package.json
* updated CHANGELOG.md * updated package.json * updated samples/package.json
Before, this was dumping an object via console.log Now, this properly prints just the label description
* updated CHANGELOG.md * updated package.json * updated samples/package.json
* updated CHANGELOG.md * updated package.json * updated samples/package.json
* updated CHANGELOG.md * updated package.json * updated samples/package.json
🤖 I have created a release \*beep\* \*boop\* --- ## [3.3.0](https://www.github.com/googleapis/nodejs-secret-manager/compare/v3.2.3...v3.3.0) (2021-01-09) ### Features * adds style enumeration ([#199](https://www.github.com/googleapis/nodejs-secret-manager/issues/199)) ([d99b4af](https://www.github.com/googleapis/nodejs-secret-manager/commit/d99b4af960182916b9a5ed0dfd1f12a2148729fb)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
No description provided.