From 72ea858e25076d1a792268cd4508ec8e6cacafc3 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sun, 29 May 2016 02:44:33 +0200 Subject: [PATCH] add logger also as class method when included --- lib/diaspora_federation/logging.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/diaspora_federation/logging.rb b/lib/diaspora_federation/logging.rb index 615e0e2..7d65e19 100644 --- a/lib/diaspora_federation/logging.rb +++ b/lib/diaspora_federation/logging.rb @@ -3,6 +3,12 @@ module DiasporaFederation # # it uses the logging-gem if available module Logging + # add +logger+ also as class method when included + # @param [Class] klass the class into which the module is included + def self.included(klass) + klass.extend(self) + end + private # get the logger for this class