From bc8ffe31c7c1d164e4ba5481f0a4baf03181b802 Mon Sep 17 00:00:00 2001
From: Nathaniel Catchpole <catch@35733.no-reply.drupal.org>
Date: Mon, 22 Sep 2014 12:44:06 +0100
Subject: [PATCH] Issue #2341701 by ParisLiakos: Provide an abstract
 logger.channel declaration.

---
 core/core.services.yml                        | 21 +++++++------------
 .../aggregator/aggregator.services.yml        |  4 +---
 core/modules/rest/rest.services.yml           |  4 +---
 3 files changed, 10 insertions(+), 19 deletions(-)

diff --git a/core/core.services.yml b/core/core.services.yml
index 173f608c2be1..631b2a4b228d 100644
--- a/core/core.services.yml
+++ b/core/core.services.yml
@@ -203,30 +203,25 @@ services:
     parent: container.trait
     tags:
       - { name: service_collector, tag: logger, call: addLogger }
-  logger.channel.default:
+  logger.channel_base:
+    abstract: true
     class: Drupal\Core\Logger\LoggerChannel
     factory_method: get
     factory_service: logger.factory
+  logger.channel.default:
+    parent: logger.channel_base
     arguments: ['system']
   logger.channel.php:
-    class: Drupal\Core\Logger\LoggerChannel
-    factory_method: get
-    factory_service: logger.factory
+    parent: logger.channel_base
     arguments: ['php']
   logger.channel.image:
-    class: Drupal\Core\Logger\LoggerChannel
-    factory_method: get
-    factory_service: logger.factory
+    parent: logger.channel_base
     arguments: ['image']
   logger.channel.cron:
-    class: Drupal\Core\Logger\LoggerChannel
-    factory_method: get
-    factory_service: logger.factory
+    parent: logger.channel_base
     arguments: ['cron']
   logger.channel.form:
-    class: Drupal\Core\Logger\LoggerChannel
-    factory_method: get
-    factory_service: logger.factory
+    parent: logger.channel_base
     arguments: ['form']
   logger.log_message_parser:
     class: Drupal\Core\Logger\LogMessageParser
diff --git a/core/modules/aggregator/aggregator.services.yml b/core/modules/aggregator/aggregator.services.yml
index 8747737f264f..6b191c8cc362 100644
--- a/core/modules/aggregator/aggregator.services.yml
+++ b/core/modules/aggregator/aggregator.services.yml
@@ -12,7 +12,5 @@ services:
     class: Drupal\aggregator\ItemsImporter
     arguments: ['@config.factory', '@plugin.manager.aggregator.fetcher', '@plugin.manager.aggregator.parser', '@plugin.manager.aggregator.processor', '@logger.channel.aggregator']
   logger.channel.aggregator:
-    class: Drupal\Core\Logger\LoggerChannel
-    factory_method: get
-    factory_service: logger.factory
+    parent: logger.channel_base
     arguments: ['aggregator']
diff --git a/core/modules/rest/rest.services.yml b/core/modules/rest/rest.services.yml
index 05fac0bfea77..c25d6920b3eb 100644
--- a/core/modules/rest/rest.services.yml
+++ b/core/modules/rest/rest.services.yml
@@ -28,7 +28,5 @@ services:
     tags:
       - { name: 'event_subscriber' }
   logger.channel.rest:
-    class: Drupal\Core\Logger\LoggerChannel
-    factory_method: get
-    factory_service: logger.factory
+    parent: logger.channel_base
     arguments: ['rest']
-- 
GitLab