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

How to view Handled messages #45

Open
paddymccrudden opened this issue Jan 7, 2020 · 3 comments
Open

How to view Handled messages #45

paddymccrudden opened this issue Jan 7, 2020 · 3 comments

Comments

@paddymccrudden
Copy link

Hi,

I am in the process of debugging and application that uses PyPubSub for its messages. I am using the snoop methods (https://pypubsub.readthedocs.io/en/v4.0.3/usage/usage_advanced_debug.html#id4) to see which messages are published. However, I'd really like to also log whenever a handler receives a message. Is there a means of doing so easily?

Paddy

@schollii
Copy link
Owner

Have you looked at the notification handlers? They will notify on various pubsub related activities like message publish, message received by which listener, topic created/deleted, etc.

@paddymccrudden
Copy link
Author

paddymccrudden commented Jul 12, 2020

Thanks - I ended up enforcing some structure on my listeners to log the events. It worked well. I did this as I couldn't see how the notification handlers managed listeners. Do you have a link on that?

@schollii
Copy link
Owner

Yes have a look at

The notifySend() method of your custom handler gets called several times for each listener.

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

No branches or pull requests

2 participants