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

Proposal: Add a configurable info/error logger #63

Merged
merged 2 commits into from
Apr 6, 2021

Conversation

TysonAndre
Copy link

For the sake of backwards compatibility, continue requiring DEBUG=apn to
log either of these.

For the sake of convenience, allow applications to manually override
these loggers on a per-Client instance basis.
A more fully-featured logger such as error/warn/info/debug might be
useful but overkill if the error conditions are rare in practice.

Related to #59
High volume uses of node-apn may benefit from logging errors but ignore
non-errors.

Related to #30

  • setLogger can be used by applications to set their own prefix

@codecov
Copy link

codecov bot commented Apr 6, 2021

Codecov Report

Merging #63 (495263f) into master (08f2ef6) will increase coverage by 1.31%.
The diff coverage is 63.41%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #63      +/-   ##
==========================================
+ Coverage   91.90%   93.22%   +1.31%     
==========================================
  Files          21       21              
  Lines         519      531      +12     
==========================================
+ Hits          477      495      +18     
+ Misses         42       36       -6     
Impacted Files Coverage Δ
lib/client.js 77.07% <63.41%> (+6.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 08f2ef6...495263f. Read the comment docs.

For the sake of backwards compatibility, continue requiring DEBUG=apn to
log either of these.

For the sake of convenience, allow applications to manually override
these loggers on a per-Client instance basis.
A more fully-featured logger such as error/warn/info/debug might be
useful but overkill if the error conditions are rare in practice.

Related to parse-community#59
High volume uses of node-apn may benefit from logging errors but ignore
non-errors.

Related to parse-community#30
- setLogger can be used by applications to set their own prefix
Copy link
Member

@davimacedo davimacedo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@davimacedo davimacedo merged commit f64a910 into parse-community:master Apr 6, 2021
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.

2 participants