Watch history in database

I run many instances of Kodi in my home and my library is synced with a mysql database. I would love it if the database was able to keep a log of everything that is watched. I’m not talking about just the watched/unwatched status but rather an entry for every time something is watched and which device (IP address or hostname) and/or profile played it. Making it searchable would be great as well. If something like this already exists as an addon, maybe someone could point me in the right direction.

For example

Code:
Title        accessedBy        dateTime
Star Wars    192.168.1.15        10-05-2016 14:58:45
Star Wars    192.168.1.15        12-13-2016 17:02:19
Star Wars    192.168.1.16        02-20-2017 09:14:22
...        ...            ...