Skip to content

Commit

Permalink
add include path
Browse files Browse the repository at this point in the history
  • Loading branch information
wangrzneu committed Oct 11, 2024
1 parent 75207a3 commit ef8cee2
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@
},
"scripts": {
"test": "vendor/bin/phpunit"
}
},
"include-path": ["lib/"]
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

use Psr\Log\LoggerInterface;
use Psr\Log\AbstractLogger;
use Psr\Log\LoggerInterface;

class DefaultLoggerPsrLogV1 extends AbstractLogger implements LoggerInterface
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<?php

use Psr\Log\LoggerInterface;
use Psr\Log\AbstractLogger;
use Psr\Log\LoggerInterface;

class DefaultLoggerPsrLogV3 extends AbstractLogger implements LoggerInterface
{
public function log(
$level,
string|\Stringable $message,
array $context = []
): void {
): void
{
$line = $level . " " . $message;
if (!empty($context)) {
$line = " " . json_encode($context, JSON_PRETTY_PRINT);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

use Psr\Log\LoggerInterface;
use Psr\Log\AbstractLogger;
use Psr\Log\LoggerInterface;

class DisabledLoggerPsrLogV1 extends AbstractLogger implements LoggerInterface
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<?php

use Psr\Log\LoggerInterface;
use Psr\Log\AbstractLogger;
use Psr\Log\LoggerInterface;

class DisabledLoggerPsrLogV3 extends AbstractLogger implements LoggerInterface
{
public function log(
$level,
string|\Stringable $message,
array $context = []
): void {
): void
{
// Do nothing
}
}
Expand Down

0 comments on commit ef8cee2

Please sign in to comment.