MIDI Loupe is a little tool, which allows you to monitor and log MIDI messages from one or multiple MIDI devices.
Every registered MIDI Source is listed and has a separate color, so you can easily differentiate between the messages.
In the device list you can select/deselect the devices for logging. You can save the logs to disk and also load them for later inspection.