semantic_logger 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,7 +6,7 @@ require 'sync_attr'
6
6
  module SemanticLogger
7
7
  autoload :Base, 'semantic_logger/base'
8
8
  autoload :Logger, 'semantic_logger/logger'
9
- autoload :Attribute, 'semantic_logger/attribute'
9
+ autoload :Loggable, 'semantic_logger/loggable'
10
10
 
11
11
  module Appender
12
12
  autoload :Base, 'semantic_logger/appender/base'
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # class ExternalSupplier
13
13
  # # Lazy load 'logger' class variable on first use
14
- # include SemanticLogger::Attribute
14
+ # include SemanticLogger::Loggable
15
15
  #
16
16
  # def call_supplier(amount, name)
17
17
  # logger.debug "Calculating with amount", { :amount => amount, :name => name }
@@ -23,13 +23,13 @@
23
23
  # end
24
24
  # end
25
25
  module SemanticLogger
26
- module Attribute
26
+ module Loggable
27
27
 
28
28
  def self.included(base)
29
29
  base.class_eval do
30
30
  # Thread safe class variable initialization
31
31
  include SyncAttr
32
-
32
+
33
33
  sync_cattr_reader :logger do
34
34
  SemanticLogger::Logger.new(self)
35
35
  end
@@ -65,8 +65,6 @@ module SemanticLogger #:nodoc:
65
65
  ActiveSupport.on_load(:active_record) { self.logger = SemanticLogger::Logger.new('ActiveRecord') }
66
66
  ActiveSupport.on_load(:action_controller) { self.logger = SemanticLogger::Logger.new('ActionController') }
67
67
  ActiveSupport.on_load(:action_mailer) { self.logger = SemanticLogger::Logger.new('ActionMailer') }
68
-
69
- SemanticLogger::Logger.logger.info "SemanticLogger initialized"
70
68
  end
71
69
 
72
70
  end
@@ -1,3 +1,3 @@
1
1
  module SemanticLogger #:nodoc
2
- VERSION = "0.10.0"
2
+ VERSION = "0.11.0"
3
3
  end
@@ -9,14 +9,14 @@ require 'semantic_logger'
9
9
  require 'stringio'
10
10
 
11
11
  class TestAttribute
12
- include SemanticLogger::Attribute
12
+ include SemanticLogger::Loggable
13
13
  end
14
14
 
15
15
 
16
16
  # Unit Test for SemanticLogger::Appender::File
17
17
  #
18
18
  class AppenderFileTest < Test::Unit::TestCase
19
- context SemanticLogger::Attribute do
19
+ context SemanticLogger::Loggable do
20
20
  setup do
21
21
  @time = Time.new
22
22
  @io = StringIO.new
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: semantic_logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -76,8 +76,8 @@ files:
76
76
  - lib/semantic_logger/appender/file.rb
77
77
  - lib/semantic_logger/appender/mongodb.rb
78
78
  - lib/semantic_logger/appender/wrapper.rb
79
- - lib/semantic_logger/attribute.rb
80
79
  - lib/semantic_logger/base.rb
80
+ - lib/semantic_logger/loggable.rb
81
81
  - lib/semantic_logger/logger.rb
82
82
  - lib/semantic_logger/railtie.rb
83
83
  - lib/semantic_logger/version.rb
@@ -100,7 +100,7 @@ files:
100
100
  - test/appender_file_test.rb
101
101
  - test/appender_mongodb_test.rb
102
102
  - test/appender_wrapper_test.rb
103
- - test/attribute_test.rb
103
+ - test/loggable_test.rb
104
104
  - test/logger_test.rb
105
105
  - test/mock_logger.rb
106
106
  - test.log
@@ -118,7 +118,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
118
118
  version: '0'
119
119
  segments:
120
120
  - 0
121
- hash: 472346735142331014
121
+ hash: 4376708956588902853
122
122
  required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  none: false
124
124
  requirements: