Use events for logging
Remove static dependency

This is causing build failures on travis and is not strictly necessary.