Warning if you want to backport this to 5.1. PSR logger is not available in this version.