imprint 1.4.3.pre5 → 1.4.3.pre6

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: 05980d80e0b7d629da935a72c8e65d703f9581d2
4
- data.tar.gz: c0fa1271f5197f9a20c8674306866eaa4426246e
3
+ metadata.gz: 1d075f248eb20771b334854e0b770ab22a2f2363
4
+ data.tar.gz: 873b75c811892b158dd29c4fef5a3bd3ac9d1f98
5
5
  SHA512:
6
- metadata.gz: 55c6061cc33b5746fb2122fff4573ac89f71faade2ddd8696b94cb8fb13a7db57c7632d1727781666be40aa2b0289b265f5d7a1aea233ea2712d0b543a6bc1c6
7
- data.tar.gz: 0761cac7622de598e87d5b7dde3523a416ce7d725d91ce4edf6a4c1be9aa264db117d4ec37d2a6616c18eef94fd051b01c533af8935eb27afa23f67be1a0e62e
6
+ metadata.gz: 5a479545dc24eca094b0a1958574621abe8a786c0a31baaa1a7fd9b5dddb285a3e2e374e0dbbf532a2538a2661c6db3c1b9257ba6698e42351377f5ab5b44626
7
+ data.tar.gz: ce7d5568689a2149868612290f09a0f15f64c0cca08f98d739fe6ec81796680b091925ea81ed879388c7c7796b44a4af7a8972e2dcd82a67b7926a09a52ddbad
@@ -8,7 +8,7 @@ module Imprint
8
8
  TRACE_CHARS = [('a'..'z'), ('A'..'Z')].map { |i| i.to_a }.flatten
9
9
 
10
10
  def self.set_trace_id(id, rack_env = {})
11
- Thread.current[TRACER_TIMESTAMP] = Time.now.utc.strftime("%Y-%m-%dT%H:%M:%S.%6N") + " ##{$$}"
11
+ Thread.current[TRACER_TIMESTAMP] = Time.now.utc.strftime("%Y-%m-%dT%H:%M:%S.%6N")
12
12
  Thread.current[TRACER_KEY] = id
13
13
  # setting to the rack_env, gives error tracking support in some systems
14
14
  rack_env[TRACER_KEY] = id
@@ -23,7 +23,11 @@ module Imprint
23
23
  end
24
24
 
25
25
  def self.get_trace_timestamp
26
- Thread.current[TRACER_TIMESTAMP] || Time.now.utc.strftime("%Y-%m-%dT%H:%M:%S.%6N") + " ##{$$}"
26
+ Time.now.utc.strftime("%Y-%m-%dT%H:%M:%S.%6N")
27
+ end
28
+
29
+ def self.get_pid
30
+ "#{$$}"
27
31
  end
28
32
 
29
33
  def self.insert_trace_id_in_message(message, severity = nil)
@@ -31,8 +35,8 @@ module Imprint
31
35
  trace_id = get_trace_id
32
36
 
33
37
  if trace_id && trace_id != TRACE_ID_DEFAULT
34
- message.insert 0, "[#{get_trace_timestamp}] #{severity} -- : "
35
- message.gsub!("\n"," trace_id=#{trace_id}\n")
38
+ message.insert 0, "log_time=#{get_trace_timestamp} log_level=#{severity} "
39
+ message.gsub!("\n"," process_pid=#{get_pid} trace_id=#{trace_id}\n")
36
40
  end
37
41
  end
38
42
  end
@@ -1,3 +1,3 @@
1
1
  module Imprint
2
- VERSION = "1.4.3.pre5"
2
+ VERSION = "1.4.3.pre6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imprint
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.3.pre5
4
+ version: 1.4.3.pre6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Mayer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-24 00:00:00.000000000 Z
11
+ date: 2015-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler