Implement error logging
PHPAPI-18: fixed initial logging implementation
Merge pull request #33 from dgmyrek/logging

Now I have access.