lib/semantic_logger/loggable.rb in semantic_logger-2.18.0 vs lib/semantic_logger/loggable.rb in semantic_logger-2.19.0

- old
+ new

@@ -1,7 +1,5 @@ -require 'sync_attr' - # Logger class variable mix-in # # Lazy initialize a logger class variable with instance accessor # # By including this mix-in into any class it will define a class level logger @@ -29,12 +27,11 @@ module SemanticLogger module Loggable def self.included(base) base.class_eval do - # Thread safe logger class variable initializer - sync_cattr_reader :logger do - SemanticLogger[self] + def self.logger + @semantic_logger ||= SemanticLogger[self] end end end # Also make the logger available as an instance method MixIn