Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge pull request zendframework/zendframework#4742 from sarge-ch/Logger
Browse files Browse the repository at this point in the history
LoggerAwareInterface and its Trait
  • Loading branch information
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/LoggerAwareInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,19 @@
*/
interface LoggerAwareInterface
{
/**
* Set logger instance
*
* @param LoggerInterface
* @return void
*/
public function setLogger(LoggerInterface $logger);

/**
* Get logger instance. Currently commented out as this would possibly break
* existing implementations.
*
* @return null|LoggerInterface
*/
// public function getLogger();
}
10 changes: 10 additions & 0 deletions src/LoggerAwareTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,14 @@ public function setLogger(LoggerInterface $logger)

return $this;
}

/**
* Get logger object
*
* @return null|LoggerInterface
*/
public function getLogger()
{
return $this->logger;
}
}

0 comments on commit d44d82d

Please sign in to comment.