Skip to content
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

Open
wants to merge 3 commits into
base: 8.x-3.x
Choose a base branch
from
Open

class \Drupal\rules\Plugin\DataType\LoggerEntry #315

wants to merge 3 commits into from

Conversation

ndf
Copy link
Contributor

@ndf ndf commented Dec 4, 2015

See https://www.drupal.org/node/2625238
Started working on it

/**
* The logger entry data type.
*
* @see: https://www.drupal.org/node/2625238
Copy link
Collaborator

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 {
Copy link
Collaborator

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);
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants