update logging to new API

Thanks for making this plugin available, we hope to get a lot of use out of it.

I have updated the logging to use the new API, generalizing as much as possible. 
It's only my second time updating plugin logging), so I'll be glad to take asuggestions.

Having troubles with PHPUnit ATM, but once I resolve those, I will supply a tests to cover this set of changes.