tiny_log 1.0.1 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tiny_log.rb +2 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0f4ac3bead71ae6bd4b79cf5bc08a84abadd04eb35e98bfcf684077ccf7bf733
4
- data.tar.gz: 5219f6fad3b63a97e969acdaea62b6cba3d77e558bab26c83d3af837b9184d14
3
+ metadata.gz: 85cff9236f798df629886d40366c8a673ea208af89d7b37bea42038ea228e030
4
+ data.tar.gz: bf24cddc2ebf348ac713c0a066731fb1b2ce296db588eb77388ac920899c6a79
5
5
  SHA512:
6
- metadata.gz: 3fa4c6404810d1b7aa2b4757dd3eed4f7c8ecdcb4252a84e90e60627bfc2409100e04baabb4e67904566a310b1586d0f64393b0110a46be08721e990b56247d6
7
- data.tar.gz: 550f4c186a01e3b420e737228b142a05e600fbe776c21c499881bc14a24d6d5b69dcd39e72b651b8e96f4dbf0d2bff356c47383bd6abb93f0aeacc0d0c95902a
6
+ metadata.gz: 8a77fd0f56106ddedd77e036643cfeff75d3c5a36d7034255e8b766ecd419ece90e7611ef183606e43c2fd8ddd2b5eabd1122d8706ac52057543ef9d4729526c
7
+ data.tar.gz: 2be85ce2aa21c78ecf995b7853937ad1517b0468ff4c3b450b0fa9c1d3dd5ad0cc1efe8a86afadba97848c5f186bf4ceadc7e5ef4baa5aacc77c15616652b6a8
data/lib/tiny_log.rb CHANGED
@@ -17,14 +17,14 @@ class TinyLog
17
17
  # if unspecified, will default to $stdout
18
18
  # if specified, attempts to open a file with the specified name to append to
19
19
  def initialize(filename=nil)
20
- @io = filename ? File.open(filename, 'a') : $stdout
20
+ @io = filename.is_a?(String) ? File.open(filename, 'a') : $stdout
21
21
  end
22
22
 
23
23
  # the clever bit that annotates the log message with a log level and UTC
24
24
  # timestamp
25
25
  def method_missing(prefix, *msgs)
26
26
  msgs.each do |m|
27
- m.lines.each do |l|
27
+ m.to_s.lines.each do |l|
28
28
  @io.puts "#{Time.now.utc.iso8601(6)} #{Process.pid.to_s.rjust(6)} #{prefix.to_s.upcase} #{l}"
29
29
  end
30
30
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tiny_log
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Lunt