Add destination parameter for ErrorLogHandler

- Refactored ErrorLogHandler to use constantes for types;
- Create PHPUnit tests for this handler.