logworm_client 0.4.0 → 0.4.1
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.
- data/CHANGELOG +3 -0
- data/Rakefile +1 -1
- data/lib/logworm_client/rack.rb +4 -1
- data/lib/logworm_client/rails.rb +4 -1
- data/logworm_client.gemspec +2 -2
- metadata +3 -3
data/CHANGELOG
CHANGED
data/Rakefile
CHANGED
data/lib/logworm_client/rack.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'benchmark'
|
2
|
+
|
1
3
|
module Logworm
|
2
4
|
class Rack
|
3
5
|
|
@@ -23,7 +25,8 @@ module Logworm
|
|
23
25
|
:profiling => appTime}) if @log_requests_short
|
24
26
|
begin
|
25
27
|
Timeout::timeout(1) {
|
26
|
-
|
28
|
+
ts = Benchmark.realtime {Logger.flush} # Flushes only if there are any entries. Times out after a second
|
29
|
+
env['rack.errors'].puts("\t *** logworm - logs sent in #{ts} seconds")
|
27
30
|
}
|
28
31
|
rescue Exception => e
|
29
32
|
# Ignore --nothing we can do
|
data/lib/logworm_client/rails.rb
CHANGED
@@ -12,6 +12,8 @@
|
|
12
12
|
###
|
13
13
|
if defined?(ActionController)
|
14
14
|
|
15
|
+
require 'benchmark'
|
16
|
+
|
15
17
|
ActionController::Base.class_eval do
|
16
18
|
@@log_requests_short = true
|
17
19
|
@@log_requests_long = false
|
@@ -45,7 +47,8 @@ if defined?(ActionController)
|
|
45
47
|
:profiling => appTime}) if @@log_requests_short
|
46
48
|
begin
|
47
49
|
Timeout::timeout(1) {
|
48
|
-
|
50
|
+
ts = Benchmark.realtime {Logworm::Logger.flush} # Flushes only if there are any entries. Times out after a second
|
51
|
+
logger.info("\t *** logworm - logs sent in #{ts} seconds")
|
49
52
|
}
|
50
53
|
rescue Exception => e
|
51
54
|
# Ignore --nothing we can do
|
data/logworm_client.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{logworm_client}
|
5
|
-
s.version = "0.4.
|
5
|
+
s.version = "0.4.1"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Pomelo, LLC"]
|
9
|
-
s.date = %q{2010-03-
|
9
|
+
s.date = %q{2010-03-13}
|
10
10
|
s.description = %q{logworm client utilities}
|
11
11
|
s.email = %q{schapira@pomelollc.com}
|
12
12
|
s.executables = ["lw-compute", "lw-heroku", "lw-tail"]
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 4
|
8
|
-
-
|
9
|
-
version: 0.4.
|
8
|
+
- 1
|
9
|
+
version: 0.4.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Pomelo, LLC
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-03-
|
17
|
+
date: 2010-03-13 00:00:00 -05:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|