ntail 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/ntail/log_line.rb +4 -2
- data/ntail.gemspec +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.4
|
data/lib/ntail/log_line.rb
CHANGED
@@ -43,6 +43,8 @@ module NginxTail
|
|
43
43
|
@parsable = if NGINX_LOG_PATTERN.match(@raw_line = line)
|
44
44
|
@remote_address, @remote_user, @time_local, @request, @status, @body_bytes_sent, @http_referer, @http_user_agent, @proxy_addresses = $~.captures
|
45
45
|
if NGINX_REQUEST_PATTERN.match(@request)
|
46
|
+
# counter example (ie. HTTP request that cannot by parsed)
|
47
|
+
# 91.203.96.51 - - [21/Dec/2010:05:26:53 +0000] "-" 400 0 "-" "-"
|
46
48
|
@http_method, @uri, @http_version = $~.captures
|
47
49
|
end
|
48
50
|
if @proxy_addresses and NGINX_PROXY_PATTERN.match(@proxy_addresses)
|
@@ -72,7 +74,7 @@ module NginxTail
|
|
72
74
|
"%#{Sickill::Rainbow.enabled ? 15 + 9 : 15}s - %s - %s - %s" % [
|
73
75
|
remote_address.foreground(color),
|
74
76
|
status.foreground(color),
|
75
|
-
uri.foreground(color),
|
77
|
+
(uri || "-").foreground(color),
|
76
78
|
to_agent_s.foreground(color)
|
77
79
|
]
|
78
80
|
end
|
@@ -372,4 +374,4 @@ module NginxTail
|
|
372
374
|
def server_error_status?() self.class.server_error_status?(self.status) ; end
|
373
375
|
|
374
376
|
end # class LogLine
|
375
|
-
end # module NginxTail
|
377
|
+
end # module NginxTail
|
data/ntail.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ntail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Peter Vandenberk
|