Notificationlistener is a project mainly written in OBJECTIVE-C and C, it's free.
Command line debugging tool to listen to distributed notifications
Usage:
notificationlistener
to see all notifications or
notificationlistener -notificationName <notification name>
to see only one type of notification.