-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up log component. Introduce MessageLogged event class.
- Loading branch information
1 parent
e83703e
commit 57c82d0
Showing
3 changed files
with
74 additions
and
17 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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
namespace Illuminate\Log\Events; | ||
|
||
class MessageLogged | ||
{ | ||
/** | ||
* The log "level". | ||
* | ||
* @var string | ||
*/ | ||
public $level; | ||
|
||
/** | ||
* The log message. | ||
* | ||
* @var string | ||
*/ | ||
public $message; | ||
|
||
/** | ||
* The log context. | ||
* | ||
* @var array | ||
*/ | ||
public $context; | ||
|
||
/** | ||
* Create a new event instance. | ||
* | ||
* @param string $level | ||
* @param string $message | ||
* @param array $context | ||
* @return void | ||
*/ | ||
public function __construct($level, $message, array $context = []) | ||
{ | ||
$this->level = $level; | ||
$this->message = $message; | ||
$this->context = $context; | ||
} | ||
} |
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
57c82d0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also a breaking change (has broken the laravel debugbar).
Didn't see any comment about it being a breaking change in the commit message as I've seen in some other commits, so just a friendly reminder just in case ;)
57c82d0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Laravel does not follow semver, so expect breaking changes. All will be documented before the 5.4 release. :)