nais-log-parser 0.16.0 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nais/log/parser.rb +9 -0
- data/lib/nais/log/parser/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7f9e5f82fed0f7ff8cbc8925cb4f48e42b5daec
|
4
|
+
data.tar.gz: cbc9b0b0a89e02cdb27e5a6aa43b9c5bcfa8cd30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6e058b926be82d8df8ef0f156d80257a948e13f88b67a4b2644192edcd5b1c807f38a7442a172f3b8e283657dafe9d1ae29911b55d01949dd90e9a92cb1803d
|
7
|
+
data.tar.gz: 207adb3bdd8889e50aed9b81bdd389b26020f29b7ed6d587f4e07b8ca2dad5033c26491d61ac25d0cdcac380f593e1d46e1ffe69f759f22c0e7c5b3cbf151048
|
data/lib/nais/log/parser.rb
CHANGED
@@ -135,6 +135,15 @@ module Nais
|
|
135
135
|
return r
|
136
136
|
end
|
137
137
|
|
138
|
+
def Parser.parse_accesslog_with_referer_useragent(str)
|
139
|
+
r,ext = Parser.parse_accesslog(str)
|
140
|
+
if !ext.nil? && m = ext.match(/^\s+\"([^\"]+)\" \"([^\"]+)\"$/)
|
141
|
+
r['referer'] = m[1] unless m[1] == '-'
|
142
|
+
r['user_agent'] = m[2] unless m[2] == '-'
|
143
|
+
end
|
144
|
+
return r
|
145
|
+
end
|
146
|
+
|
138
147
|
def Parser.parse_glog(str)
|
139
148
|
if m = str.match(/^([IWEF])(\d{4} \d\d:\d\d:\d\d.\d{6})\s+(\S+)\s([^:]+):(\d+)\]\s+(.*)/)
|
140
149
|
r = {}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nais-log-parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Terje Sannum
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
91
|
version: '0'
|
92
92
|
requirements: []
|
93
93
|
rubyforge_project:
|
94
|
-
rubygems_version: 2.6.
|
94
|
+
rubygems_version: 2.6.14
|
95
95
|
signing_key:
|
96
96
|
specification_version: 4
|
97
97
|
summary: Log parsing
|