Make logging available for unit tests

This fix allows to write logs from unit tests.

Logger config moved to upper level in case of being available to unit tests for common classes.
This block is here in case of [this](https://github.com/yiisoft/yii2/blob/master/extensions/codeception/TestCase.php#L129)