forked from node-apn/node-apn
-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Add an optional identifier/prefix for debug logs emitted by an APNs client #30
Labels
Comments
TysonAndre
changed the title
Add an optional identifier/prefix for debug logs emitted by an APNs client
Idea: Add an optional identifier/prefix for debug logs emitted by an APNs client?
Oct 13, 2020
TysonAndre
added a commit
to TysonAndre/node-apn
that referenced
this issue
Apr 6, 2021
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
TysonAndre
added a commit
to TysonAndre/node-apn
that referenced
this issue
Apr 6, 2021
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
davimacedo
pushed a commit
that referenced
this issue
Apr 6, 2021
* Proposal: Add a configurable info/error logger 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 * Check if errorLogger is enabled
mtrezza
changed the title
Idea: Add an optional identifier/prefix for debug logs emitted by an APNs client?
Add an optional identifier/prefix for debug logs emitted by an APNs client
Mar 27, 2022
Thanks for opening this issue!
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, node-apn emits debug logs such as
apn Ping response after 11.645432 ms
.This is ambiguous if more than one provider/client instances are created, e.g. when pushing to more than one app, or if refreshing credentials and creating a new Provider (exceedingly unlikely).
It may be useful to have a prefix that could be added to the passed in options to disambiguate them to see when something went wrong in a given client, e.g. here, it could be inferred that first-app stopped responding to pings
Low priority because reliability will hopefully be improved in the next release
The text was updated successfully, but these errors were encountered: