semlogger 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.0.2
@@ -35,7 +35,8 @@ class Semlogger < ::Logger
35
35
 
36
36
  def format_msg msg
37
37
  case msg
38
- when String, Numeric, true, false, nil then [msg]
38
+ when Numeric, true, false, nil then [:const, msg]
39
+ when String then [:str, msg]
39
40
  when Exception then [:exception, msg.class.name, msg.message.to_s, msg.backtrace]
40
41
  else [:obj, msg]
41
42
  end
@@ -7,7 +7,7 @@ class Semlogger::Writer < Semlogger::Output
7
7
  end
8
8
 
9
9
  def add severity, time, progname, data, tags, message
10
- @logdev.write [severity, time, progname, data, tags, message].to_json
10
+ @logdev.write [severity, time, progname, data, tags, message].to_json+"\n"
11
11
  end
12
12
  end
13
13
 
@@ -24,7 +24,7 @@ class Semlogger::Printer < Semlogger::Output
24
24
  r = "Exception: #{message[2]} (#{message[1]}"
25
25
  r << "\n\t" << message[3].join( "\n\t") if message[3]
26
26
  r
27
- when String, Numeric, true, false, nil then message[0]
27
+ when :str, :const then message[1]
28
28
  when :obj then message[1].inspect
29
29
  else message.inspect
30
30
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 1
9
- version: 0.0.1
8
+ - 2
9
+ version: 0.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Denis Knauf
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2012-05-14 00:00:00 +02:00
17
+ date: 2012-05-20 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency