Fixes #3101: Improved handling of log target failures. It will now skip target and log reason instead of going into infinite cycle
Moved handling from Target to Dispatcher, fixed edge cases
Merge pull request #4067 from yiisoft/better-log-target-failures

Fixes #3101: Improved handling of log target failures