[DX]Log exceptions

This PR logs exception. It makes the assumption that the container has a service named 'logger'. It this assumption is wrong it can be improved by using a protected method that would either log messages or throw them away, or by using the [NullObject pattern](https://en.wikipedia.org/wiki/Null_Object_pattern), whichever you prefer. This PR is not incompatible #1982 , I think both functionalities should be added