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