ntail 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/ntail/log_line.rb +4 -2
  3. data/ntail.gemspec +1 -1
  4. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.4
@@ -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
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ntail}
8
- s.version = "0.0.3"
8
+ s.version = "0.0.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Peter Vandenberk"]
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: 25
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Peter Vandenberk