1*dad993c5SAndreas Gohr<?php 2*dad993c5SAndreas Gohr 3*dad993c5SAndreas Gohrnamespace Psr\Log; 4*dad993c5SAndreas Gohr 5*dad993c5SAndreas Gohr/** 6*dad993c5SAndreas Gohr * Basic Implementation of LoggerAwareInterface. 7*dad993c5SAndreas Gohr */ 8*dad993c5SAndreas Gohrtrait LoggerAwareTrait 9*dad993c5SAndreas Gohr{ 10*dad993c5SAndreas Gohr /** 11*dad993c5SAndreas Gohr * The logger instance. 12*dad993c5SAndreas Gohr * 13*dad993c5SAndreas Gohr * @var LoggerInterface|null 14*dad993c5SAndreas Gohr */ 15*dad993c5SAndreas Gohr protected $logger; 16*dad993c5SAndreas Gohr 17*dad993c5SAndreas Gohr /** 18*dad993c5SAndreas Gohr * Sets a logger. 19*dad993c5SAndreas Gohr * 20*dad993c5SAndreas Gohr * @param LoggerInterface $logger 21*dad993c5SAndreas Gohr */ 22*dad993c5SAndreas Gohr public function setLogger(LoggerInterface $logger) 23*dad993c5SAndreas Gohr { 24*dad993c5SAndreas Gohr $this->logger = $logger; 25*dad993c5SAndreas Gohr } 26*dad993c5SAndreas Gohr} 27