Skip to content

Commit

Permalink
Adding env variable to enable disable stdout logger (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShuCh3n authored Mar 1, 2024
1 parent 35ab3e8 commit 71f68ee
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Handlers/Logging/DefaultLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ class DefaultLogger implements Subject, LoggerInterface
*/
public function __construct()
{
$this->attach(new Monolog());
if (($_ENV['BPE_LOG'] ?? false) === 'true')
{
$this->attach(new Monolog());
}

if (($_ENV['BPE_REPORT_ERROR'] ?? false) === 'true')
{
Expand Down
2 changes: 2 additions & 0 deletions tests/Buckaroo/Payments/KBCTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

class KBCTest extends BuckarooTestCase
{
protected array $paymentPayload;

protected function setUp(): void
{
$this->paymentPayload = ([
Expand Down
2 changes: 2 additions & 0 deletions tests/Buckaroo/Payments/SepaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

class SepaTest extends BuckarooTestCase
{
protected array $paymentPayload;

protected function setUp(): void
{
$this->paymentPayload = ([
Expand Down
2 changes: 2 additions & 0 deletions tests/Buckaroo/Payments/SofortTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

class SofortTest extends BuckarooTestCase
{
protected array $paymentPayload;

protected function setUp(): void
{
$this->paymentPayload = ([
Expand Down

0 comments on commit 71f68ee

Please sign in to comment.