forked from Thijzer/csv-validation-header.wip
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implemented Psr Logger * composer require psr/log * Invalid Items count on step (#80) * log: show invalid items as warning * cleanup --------- Co-authored-by: Thijs De Paepe <[email protected]>
- Loading branch information
Showing
7 changed files
with
115 additions
and
15 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
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
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,53 @@ | ||
<?php | ||
|
||
namespace Misery\Component\Logger; | ||
|
||
use Psr\Log\LoggerInterface; | ||
|
||
class OutputLogger implements LoggerInterface | ||
{ | ||
public function emergency($message, array $context = []): void | ||
{ | ||
$this->log('emergency', $message, $context); | ||
} | ||
|
||
public function alert($message, array $context = []): void | ||
{ | ||
$this->log('alert', $message, $context); | ||
} | ||
|
||
public function critical($message, array $context = []): void | ||
{ | ||
$this->log('critical', $message, $context); | ||
} | ||
|
||
public function error($message, array $context = []): void | ||
{ | ||
$this->log('error', $message, $context); | ||
} | ||
|
||
public function warning($message, array $context = []): void | ||
{ | ||
$this->log('warning', $message, $context); | ||
} | ||
|
||
public function notice($message, array $context = []): void | ||
{ | ||
$this->log('notice', $message, $context); | ||
} | ||
|
||
public function info($message, array $context = []): void | ||
{ | ||
$this->log('info', $message, $context); | ||
} | ||
|
||
public function debug($message, array $context = []): void | ||
{ | ||
$this->log('debug', $message, $context); | ||
} | ||
|
||
public function log($level, $message, array $context = []): void | ||
{ | ||
echo $message . PHP_EOL; | ||
} | ||
} |
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