Skip to content

Commit

Permalink
Merge pull request #22 from ucloud/feat/dependency-update
Browse files Browse the repository at this point in the history
add include path
  • Loading branch information
wangrzneu authored Oct 11, 2024
2 parents e8507f1 + ef8cee2 commit ec1023c
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 ec1023c

Please sign in to comment.