Skip to content
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

Merged
merged 1 commit into from
Sep 1, 2016
Merged

Slight refactor of logging samples. #199

merged 1 commit into from
Sep 1, 2016

Conversation

jmdobry
Copy link
Member

@jmdobry jmdobry commented Sep 1, 2016

No description provided.

// Get a reference to an existing log
var log = logging.log(options.name);

function writeLogEntryAdvanced (logName, options, callback) {
Copy link
Contributor

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?

Copy link
Member Author

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);
Copy link
Contributor

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)

@ace-n
Copy link
Contributor

ace-n commented Sep 1, 2016

LGTM, assuming the naked asserts aren't an issue (or will be resolved in a separate PR).

@codecov-io
Copy link

Current coverage is 89.20% (diff: 100%)

Merging #199 into master will increase coverage by 0.07%

@@             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          

Powered by Codecov. Last update 2f9b34f...6174d46

@jmdobry jmdobry merged commit b6cbadd into master Sep 1, 2016
@jmdobry jmdobry deleted the logs branch September 1, 2016 20:55
ivanmkc pushed a commit that referenced this pull request Nov 3, 2022
ahrarmonsur pushed a commit that referenced this pull request Nov 8, 2022
grayside pushed a commit that referenced this pull request Nov 8, 2022
pattishin pushed a commit that referenced this pull request Nov 9, 2022
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
pattishin pushed a commit that referenced this pull request Nov 9, 2022
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
pattishin pushed a commit that referenced this pull request Nov 9, 2022
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
ace-n pushed a commit that referenced this pull request Nov 10, 2022
NimJay pushed a commit that referenced this pull request Nov 11, 2022
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
ace-n pushed a commit that referenced this pull request Nov 11, 2022
* updated CHANGELOG.md

* updated package.json

* updated samples/package.json
ace-n pushed a commit that referenced this pull request Nov 11, 2022
* updated CHANGELOG.md

* updated package.json

* updated samples/package.json
ace-n pushed a commit that referenced this pull request Nov 14, 2022
* updated CHANGELOG.md

* updated package.json

* updated samples/package.json
ace-n pushed a commit that referenced this pull request Nov 15, 2022
* updated CHANGELOG.md

* updated package.json

* updated samples/package.json
ace-n pushed a commit that referenced this pull request Nov 15, 2022
* updated CHANGELOG.md

* updated package.json

* updated samples/package.json
ace-n pushed a commit that referenced this pull request Nov 16, 2022
telpirion pushed a commit that referenced this pull request Nov 16, 2022
Before, this was dumping an object via console.log
Now, this properly prints just the label description
ace-n pushed a commit that referenced this pull request Nov 17, 2022
ace-n pushed a commit that referenced this pull request Nov 17, 2022
* updated CHANGELOG.md

* updated package.json

* updated samples/package.json
ace-n pushed a commit that referenced this pull request Nov 17, 2022
* updated CHANGELOG.md

* updated package.json

* updated samples/package.json
ace-n pushed a commit that referenced this pull request Nov 17, 2022
ace-n pushed a commit that referenced this pull request Nov 17, 2022
ahrarmonsur pushed a commit that referenced this pull request Nov 17, 2022
ahrarmonsur pushed a commit that referenced this pull request Nov 17, 2022
* updated CHANGELOG.md

* updated package.json

* updated samples/package.json
ace-n pushed a commit that referenced this pull request Nov 17, 2022
ace-n pushed a commit that referenced this pull request Nov 17, 2022
ace-n pushed a commit that referenced this pull request Nov 17, 2022
jsimonweb pushed a commit to jsimonweb/nodejs-docs-samples that referenced this pull request Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants