add logger also as class method when included
This commit is contained in:
parent
a5e1d8aa90
commit
72ea858e25
1 changed files with 6 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue