- 🇨🇭Switzerland berdir Switzerland
+++ b/src/Plugin/tmgmt/Translator/MemoQTranslator.php @@ -182,7 +195,7 @@ class MemoQTranslator extends TranslatorPluginBase implements ContainerFactoryPl } catch (TMGMTException $e) { - \Drupal::logger('tmgmt_memoq')->error('Job has been rejected with following error: @error', + $this->logger->error('Job has been rejected with following error: @error', ['@error' => $e->getMessage()]); $job->rejected('Job has been rejected with following error: @error',
not injecting/defining this as a service was done kind of on purpose. Log channels and the logger factory are quite heavy services as all the loggers get initialized and we only need it if something goes wrong.
- 🇩🇪Germany a.dmitriiev
Here is the new patch without dependency injection for logger. No interdiff, because the previous patch doesn't apply anymore.
- 🇩🇪Germany a.dmitriiev
@Berdir, is there anything else that I can do here? Please let me know.