-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
class \Drupal\rules\Plugin\DataType\LoggerEntry #315
base: 8.x-3.x
Are you sure you want to change the base?
Conversation
/** | ||
* The logger entry data type. | ||
* | ||
* @see: https://www.drupal.org/node/2625238 |
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.
the "@see" annotations should not have a colon after it, see https://www.drupal.org/coding-standards/docs#see
* definition_class = "\Drupal\Core\TypedData\MapDataDefinition" | ||
* ) | ||
*/ | ||
class LoggerEntry extends Map { |
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.
you can look at examples for typed data in core: Language.php
@@ -72,6 +73,10 @@ public function log($level, $message, array $context = array()) { | |||
'timestamp' => $context['timestamp'], | |||
); | |||
|
|||
$logger_entry = new LoggerEntry(); | |||
$logger_entry->log($level, $message, $context, $this->parser); |
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.
The logger entry should not have a log() method. It should have a setMessage() method, a setLevel() method etc.
See https://www.drupal.org/node/2625238
Started working on it