chvanikoff / apns4ex

APNS for Elixir
MIT License
70 stars 23 forks source link

Log the message id so that it can be associated with callback logs #27

Closed ramhoj closed 8 years ago

ramhoj commented 8 years ago

We realize that we often want to see which APNS token did received errors in Callback.error/1. We figured that the simplest way to do this is to log the message id and apns token for each push sent. We can then associate the message id logged in Callback.error/1 with the log from the worker and in that way find the token.

chvanikoff commented 8 years ago

Hi @ramhoj , I think logging should be removed from Worker and another callback to be added to Callback module which will handle ok/error results from ssl.send. Thoughts? cc @zepplock

zepplock commented 8 years ago

@chvanikoff that makes sense. I would suggest merging this one and creating an issue to refactor all logging to something like APNS.Logger, just like you had it with errors.

ramhoj commented 8 years ago

I agree @chvanikoff, @zepplock.

Linuus commented 8 years ago

@chvanikoff What do you think about merging this and creating a separate issue with an overhaul of all the logging, as @zepplock said?