tee_logger 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9058b6e01266bfb96d6729b17ea1dc97cb74cc94
4
- data.tar.gz: 706036b627118814ad9f32842c5f836cdb9920ae
3
+ metadata.gz: 68e6895e0af9a49ee888c733815c09316e5dd412
4
+ data.tar.gz: 9c7b5ce69e3c445393f38acd60de08fca85f7549
5
5
  SHA512:
6
- metadata.gz: f35e33f05d6bcf14ac60949f60c781373cac5bbd93643cd9e398f9d691578e9911fe3e4e14923efff57282de4668663b62208406e9890760a6a206c0ee23a5a3
7
- data.tar.gz: 8bc9f86022717a8a61319eab2585fb84d176762938e9279aa00c2e44d1e365ec5bd6ccc2cdada778583150192954f196b895b1c3259322b23a6a0e47a990ac79
6
+ metadata.gz: b23d0cb8cfa8caa9e426038b83b4d06097822a3a80715fc14c5662bfc7920cc35f80e567802649473f531ea8b2dc4d99ecd03a937d5bf257b942ccb5e7132f11
7
+ data.tar.gz: 0a96a4049b5d6232b062c1830c222b845f364caf405c6319c18caaa98a6f81dd50bffc5d76fc877ff49dcbe221db7f1a57b26611bc4999ecbce0ac408ca99700
@@ -1,4 +1,4 @@
1
1
  # main
2
2
  module TeeLogger
3
- VERSION = '1.0.0'
3
+ VERSION = '1.1.0'
4
4
  end
data/lib/tee_logger.rb CHANGED
@@ -11,11 +11,11 @@ module TeeLogger
11
11
  @_run_once = false
12
12
  def self.setup
13
13
  return base_logger if @_run_once
14
+ define_singleton_methods_for_setup
14
15
 
15
16
  yield(self) if block_given?
16
17
  @_run_once = true
17
18
 
18
- define_singleton_methods_for_setup
19
19
  define_singleton_methods_for_logging
20
20
  define_singleton_methods_for_logging_with_prefix
21
21
  base_logger
@@ -24,24 +24,24 @@ module TeeLogger
24
24
  class << self
25
25
  private
26
26
 
27
- def base_logger
28
- @base_logger ||= Base.new(logdev, shift_age, shift_size)
29
- end
30
-
31
27
  def define_singleton_methods_for_setup
32
28
  %i(logdev shift_age shift_size).each do |name|
33
29
  define_singleton_method(name) do
34
30
  instance_variable_get("@#{name}".to_sym)
35
31
  end
36
- private_class_method name
32
+ # private_class_method name
37
33
 
38
34
  define_singleton_method("#{name}=") do |arg|
39
35
  instance_variable_set("@#{name}".to_sym, arg)
40
36
  end
41
- private_class_method "#{name}=".to_sym
37
+ # private_class_method "#{name}=".to_sym
42
38
  end
43
39
  end
44
40
 
41
+ def base_logger
42
+ @base_logger ||= Base.new(logdev, shift_age, shift_size)
43
+ end
44
+
45
45
  def define_singleton_methods_for_logging
46
46
  LOGGING_METHODS.each do |name|
47
47
  define_singleton_method(name) do |progname = nil, &block|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tee_logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - k-ta-yamada