dns_one 0.4.47 → 0.4.48

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: 9e3910aa0b2cc959315beef742853c585f007d17
4
- data.tar.gz: 127e6644560bc344e42c50835f1b20da7a72b3ba
3
+ metadata.gz: f5594e70d0e8e9e4e1a48fdfd912d679708807ba
4
+ data.tar.gz: f07e8e672204c721295f875542f4a5e3f41ea8da
5
5
  SHA512:
6
- metadata.gz: 0bf3351c3d9c51b0982b1413478ff895b915df94e242bf5de5dd640dd300f1918dd334456147852ed2c7401c0769932e3f58e1752a2ca36de53516733dc498e8
7
- data.tar.gz: 358692c6cafd95b10dc5e2c961013d6eefe408666eb471f095601d7dae84ff9dac49c9500fa835c6802c7ce9b0f495e2281f3c3453b42ba199ae6d3cdd257908
6
+ metadata.gz: 4d36a7402147335e9390e9486ff972648fc9ad0142581021a6fff15848470a0b13f6e589800aad62c0bf09e14a68c6d772c70f7600e89f2b1a79bb5e01a8e2d1
7
+ data.tar.gz: d7beb92f9e3d1b3bbe9f244086cbed96cbaa721faaa46d28c5fd361c2a775f944ef3e8e0a1f0621040e051e3042bd368154e3d063a124e30a75b0084b56ce7f0
@@ -5,11 +5,10 @@ class Log < Logger
5
5
  class << self
6
6
 
7
7
  # 'def [d|i|w|e|f] msg' for DEBUG INFO WARN ERROR FATAL
8
- Logger::Severity::constants.each_with_index do |severity, severity_num|
9
- next if severity == :UNKNOWN
8
+ Logger::Severity::constants.each do |severity|
10
9
  method_name = severity.to_s[0].downcase
11
10
  define_method(method_name) do |msg|
12
- log severity_num, msg
11
+ log severity, msg
13
12
  end
14
13
  end
15
14
 
@@ -56,14 +55,18 @@ class Log < Logger
56
55
  end
57
56
 
58
57
  def log severity, msg
59
- met_name = Logger::Severity::constants[severity].downcase
58
+ met_name = severity.downcase
60
59
 
61
60
  @logger.send met_name, msg
62
61
 
63
- if severity >= SYSLOG_MIN_SEVERITY
62
+ if sev_num(severity) >= SYSLOG_MIN_SEVERITY
64
63
  @syslog.send met_name, msg
65
64
  end
66
65
  end
66
+
67
+ def sev_num sev
68
+ Object.const_get "Logger::#{sev}"
69
+ end
67
70
  end
68
71
  end
69
72
 
@@ -1,3 +1,3 @@
1
1
  module DnsOne
2
- VERSION = "0.4.47"
2
+ VERSION = "0.4.48"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dns_one
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.47
4
+ version: 0.4.48
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Lobato