This repository has been archived by the owner on Jul 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 470
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #248 from Art4/Logger
New PSR-3 compatible Logger
- Loading branch information
Showing
30 changed files
with
1,528 additions
and
43 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,5 @@ cache/* | |
composer.phar | ||
composer.lock | ||
config/custom.php | ||
Deciphers.log | ||
logs/* | ||
vendor |
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
Empty file.
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,37 @@ | ||
<?php | ||
|
||
namespace YoutubeDownloader\Logger\Handler; | ||
|
||
/** | ||
* An entry interface for a handler instance | ||
*/ | ||
interface Entry | ||
{ | ||
/** | ||
* Returns the message | ||
* | ||
* @return string | ||
*/ | ||
public function getMessage(); | ||
|
||
/** | ||
* Returns the context | ||
* | ||
* @return array | ||
*/ | ||
public function getContext(); | ||
|
||
/** | ||
* Returns the level | ||
* | ||
* @return string | ||
*/ | ||
public function getLevel(); | ||
|
||
/** | ||
* Returns the created DateTime | ||
* | ||
* @return DateTime | ||
*/ | ||
public function getCreatedAt(); | ||
} |
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,25 @@ | ||
<?php | ||
|
||
namespace YoutubeDownloader\Logger\Handler; | ||
|
||
/** | ||
* Describes a handler instance | ||
*/ | ||
interface Handler | ||
{ | ||
/** | ||
* Check if this handler handels a log level | ||
* | ||
* @param string $level A valid log level from LogLevel class | ||
* @return boolean | ||
*/ | ||
public function handles($level); | ||
|
||
/** | ||
* Handle an entry | ||
* | ||
* @param Entry $entry | ||
* @return boolean | ||
*/ | ||
public function handle(Entry $entry); | ||
} |
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,31 @@ | ||
<?php | ||
|
||
namespace YoutubeDownloader\Logger\Handler; | ||
|
||
/** | ||
* a handler instance that handles no entries | ||
*/ | ||
class NullHandler implements Handler | ||
{ | ||
/** | ||
* Check if this handler handels a log level | ||
* | ||
* @param string $level A valid log level from LogLevel class | ||
* @return boolean | ||
*/ | ||
public function handles($level) | ||
{ | ||
return false; | ||
} | ||
|
||
/** | ||
* Handle an entry | ||
* | ||
* @param Entry $entry | ||
* @return boolean | ||
*/ | ||
public function handle(Entry $entry) | ||
{ | ||
return false; | ||
} | ||
} |
Oops, something went wrong.