summaryrefslogtreecommitdiffstats
path: root/core/modules/rest/src/Plugin/rest/resource/EntityResource.php
diff options
context:
space:
mode:
authorNathaniel Catchpole2014-07-31 13:44:46 +0100
committerNathaniel Catchpole2014-07-31 13:46:06 +0100
commita91ef2b8538f2a03fd704d2ac0d906234750c7a4 (patch)
treed01597718ff8ed98066e8d1d1c9ba9450042f8c4 /core/modules/rest/src/Plugin/rest/resource/EntityResource.php
parentced85d104ad34336a251ea8eb9fc322aae940746 (diff)
Issue #2272481 by herom, ParisLiakos, tim.plunkett: Remove usages of watchdog() from forms, plugins and controllers.
Diffstat (limited to 'core/modules/rest/src/Plugin/rest/resource/EntityResource.php')
-rw-r--r--core/modules/rest/src/Plugin/rest/resource/EntityResource.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/modules/rest/src/Plugin/rest/resource/EntityResource.php b/core/modules/rest/src/Plugin/rest/resource/EntityResource.php
index 40f7fe6..c39b88f 100644
--- a/core/modules/rest/src/Plugin/rest/resource/EntityResource.php
+++ b/core/modules/rest/src/Plugin/rest/resource/EntityResource.php
@@ -94,7 +94,7 @@ class EntityResource extends ResourceBase {
$this->validate($entity);
try {
$entity->save();
- watchdog('rest', 'Created entity %type with ID %id.', array('%type' => $entity->getEntityTypeId(), '%id' => $entity->id()));
+ $this->logger->notice('Created entity %type with ID %id.', array('%type' => $entity->getEntityTypeId(), '%id' => $entity->id()));
$url = url(strtr($this->pluginId, ':', '/') . '/' . $entity->id(), array('absolute' => TRUE));
// 201 Created responses have an empty body.
@@ -154,7 +154,7 @@ class EntityResource extends ResourceBase {
$this->validate($original_entity);
try {
$original_entity->save();
- watchdog('rest', 'Updated entity %type with ID %id.', array('%type' => $entity->getEntityTypeId(), '%id' => $entity->id()));
+ $this->logger->notice('Updated entity %type with ID %id.', array('%type' => $entity->getEntityTypeId(), '%id' => $entity->id()));
// Update responses have an empty body.
return new ResourceResponse(NULL, 204);
@@ -181,7 +181,7 @@ class EntityResource extends ResourceBase {
}
try {
$entity->delete();
- watchdog('rest', 'Deleted entity %type with ID %id.', array('%type' => $entity->getEntityTypeId(), '%id' => $entity->id()));
+ $this->logger->notice('Deleted entity %type with ID %id.', array('%type' => $entity->getEntityTypeId(), '%id' => $entity->id()));
// Delete responses have an empty body.
return new ResourceResponse(NULL, 204);