oohlalog 1.0.2 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZjdiODczZWIzOGViYTBjN2YzOGVkNjJiN2YwYTVlZjgxMzMwODNjNA==
5
- data.tar.gz: !binary |-
6
- YjQ2N2Q5ZTlhY2Y4MjllZjIxZGM0MGJhNGNkNDI4YzgzM2JmZjkyZg==
2
+ SHA1:
3
+ metadata.gz: 2cba03077d73f89a2191e7bcba07189dc3e0507c
4
+ data.tar.gz: 496a5767b112b344ce7d7c19e30db47b23191814
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- ZjlmOTc2YjRkZWViNTYzMTlkMzEyNWFmNGQ5OTMzZDEzZTZmYTBmNDI1ZjZk
10
- NzU5ODFmNzk4ODc3YjljOGU4NjgyNTIwZTY2ZTA2ZmMzMTRmZjU3ZmE1NTlk
11
- M2U2YTZmMmM4NzE4MGZiZjUyOGI1MDQ3YTQzMDkyMzYwOWRlYmQ=
12
- data.tar.gz: !binary |-
13
- MTQ2OGU0ZmY5NDM1ZTMwYWYyMWI5YmJjNDY0NzI1ZjZhODBmZTJiNmRkNzEz
14
- NmU3NDUzYTdhNTQ5OTliNzJlMDQ3MTllZjJlZjM1YmU1MTljZjI4YmZlMmI4
15
- MGQ3MjFkZjIzMmMyYTczMTU1ZmE2NzI3MGRhMzU5YzgzNmUwZDQ=
6
+ metadata.gz: f85124c79792ad2761c28c65d912c3932b4db6c1b53fc85b4fa2e35613395dbe7fe22db96e20954c9d506f22e4f12610d11d88f4eba70bbf67e179c979e2f3a4
7
+ data.tar.gz: ee87d7d3bc44286afdfbea2c8e4ba85bd1255a1fa741b6045b8ec92b75f34c583d2cd74e9e7d9f4ee226433b8c7a791f26906499be649229f58e4cd0a23044f2
@@ -10,7 +10,7 @@ module Oohlalog
10
10
 
11
11
  def add_with_oohlalog(severity, message, prog_name, &block)
12
12
  if severity >= self.level
13
- @@oohla_logger.add(severity, message, nil)
13
+ @@oohla_logger.add(severity, message, prog_name)
14
14
  end
15
15
  add_without_oohlalog(severity, message, prog_name, &block)
16
16
  end
@@ -28,15 +28,22 @@ class Oohlalog::Logger
28
28
  end
29
29
 
30
30
  def add(severity, message, category=nil, details=nil)
31
- return if message.nil? || message.to_s.empty?
32
- if severity >= self.level
33
- if details.nil? && defined?(message.backtrace)
34
- details = message.backtrace.join("\n")
35
- end
36
- @buffer << {level: severity_string(severity), message: message.to_s.gsub(/\e\[(\d+)m/, '') , category: category, details: details, timestamp:Time.now.to_i * 1000, hostName: Socket.gethostname}
37
- check_buffer_size
38
- return
39
- end
31
+ log_message = message
32
+ if message.nil? || message.to_s.empty?
33
+ log_message = category
34
+ category = nil
35
+ end
36
+
37
+ return if log_message.nil? || log_message.to_s.empty?
38
+
39
+ if severity >= self.level
40
+ if details.nil? && defined?(log_message.backtrace)
41
+ details = log_message.backtrace.join("\n")
42
+ end
43
+ @buffer << {level: severity_string(severity), message: log_message.to_s.gsub(/\e\[(\d+)m/, '') , category: category, details: details, timestamp:Time.now.to_i * 1000, hostName: Socket.gethostname}
44
+ check_buffer_size
45
+ return
46
+ end
40
47
  end
41
48
 
42
49
  Severity.constants.each do |severity|
@@ -1,3 +1,3 @@
1
1
  module Oohlalog
2
- VERSION = "1.0.2"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oohlalog
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Estes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-11 00:00:00.000000000 Z
11
+ date: 2014-04-25 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Rails/Ruby Logger Tie-in for OohLaLog.com
14
14
  email:
@@ -38,17 +38,17 @@ require_paths:
38
38
  - lib
39
39
  required_ruby_version: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - ! '>='
41
+ - - '>='
42
42
  - !ruby/object:Gem::Version
43
43
  version: '0'
44
44
  required_rubygems_version: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - ! '>='
46
+ - - '>='
47
47
  - !ruby/object:Gem::Version
48
48
  version: '0'
49
49
  requirements: []
50
50
  rubyforge_project:
51
- rubygems_version: 2.1.10
51
+ rubygems_version: 2.0.5
52
52
  signing_key:
53
53
  specification_version: 4
54
54
  summary: The OohLaLog service allows for cloud logging from multiple servers. This