-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replaced thrown exceptions logic with logger->warning calls for Thrif…
…tUdpTransport
- Loading branch information
Alexander Pekhota
committed
Sep 15, 2021
1 parent
98b3af3
commit 1f1462a
Showing
3 changed files
with
81 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
namespace Jaeger\Tests\Logger; | ||
|
||
use Psr\Log\LoggerTrait; | ||
|
||
class StackLogger implements \Psr\Log\LoggerInterface | ||
{ | ||
/** @var array */ | ||
protected $messagesStack = []; | ||
|
||
use LoggerTrait; | ||
|
||
public function log($level, $message, array $context = array()) | ||
{ | ||
$this->messagesStack[] = $message; | ||
} | ||
|
||
public function getLastMessage() { | ||
return array_pop($this->messagesStack); | ||
} | ||
|
||
public function getMessagesCount() { | ||
return count($this->messagesStack); | ||
} | ||
|
||
public function clear() { | ||
$this->messagesStack = []; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters