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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a22d8128eb44099b9e5f2cb61e6cd3d94fb8f834
4
- data.tar.gz: 9a9f29d5d79e8fdc9acc6e89752043424882667a
3
+ metadata.gz: c7f9e5f82fed0f7ff8cbc8925cb4f48e42b5daec
4
+ data.tar.gz: cbc9b0b0a89e02cdb27e5a6aa43b9c5bcfa8cd30
5
5
  SHA512:
6
- metadata.gz: 0645df62265297a14768930b562054116dd28523e72b22bb37f8b1a2785b00c8b58c65c6d2b865e9deb6906beb5849cf539503913575c10db8c62b878efb542e
7
- data.tar.gz: a7da06b62ee33914201aa56a460f853f16947d3688f03a3184164b1462e87ebf9dabd9ade5425d8d2714d914e1daa9d5162424e10ef0da03dce5eff32d7adac8
6
+ metadata.gz: b6e058b926be82d8df8ef0f156d80257a948e13f88b67a4b2644192edcd5b1c807f38a7442a172f3b8e283657dafe9d1ae29911b55d01949dd90e9a92cb1803d
7
+ data.tar.gz: 207adb3bdd8889e50aed9b81bdd389b26020f29b7ed6d587f4e07b8ca2dad5033c26491d61ac25d0cdcac380f593e1d46e1ffe69f759f22c0e7c5b3cbf151048
@@ -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 = {}
@@ -1,7 +1,7 @@
1
1
  module Nais
2
2
  module Log
3
3
  module Parser
4
- VERSION = "0.16.0"
4
+ VERSION = "0.17.0"
5
5
  end
6
6
  end
7
7
  end
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.16.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-13 00:00:00.000000000 Z
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.13
94
+ rubygems_version: 2.6.14
95
95
  signing_key:
96
96
  specification_version: 4
97
97
  summary: Log parsing