apache_log_report 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/apache_log_report.rb +7 -11
- data/lib/apache_log_report/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a554ad8352b97f32dd81c004d6b78f1e7d8e2ea284bb7dc7ef18eb3fee7687a
|
4
|
+
data.tar.gz: 0d6e6243eabf89425e174a7ce76948cfd9517fbf3c226a2e77bb746bb43e8223
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75a8de1b3375eec45a4ffb41cfa37d834c89ec07e92155d31b2e872e5040fb22709f759bd5aa6bbfc5ed5c84852a9b26c6f603019cb2fb43d21a56a0d33f8eaf
|
7
|
+
data.tar.gz: baa9f268e1e7dcdb72463bf4b4aac1d585524b3ba7db2da1408259f8d54f59424003094372b491791b2788f9f7b3de68a8d1cec8919cd1991ccb5c856677b94c
|
data/lib/apache_log_report.rb
CHANGED
@@ -116,12 +116,11 @@ module ApacheLogReport
|
|
116
116
|
|
117
117
|
parser = ApacheLog::Parser.new(options[:format] || 'combined')
|
118
118
|
|
119
|
-
content.
|
120
|
-
|
119
|
+
content.each do |line|
|
120
|
+
begin
|
121
|
+
hash = parser.parse line
|
121
122
|
|
122
|
-
if hash != {}
|
123
123
|
ua = Browser.new(hash[:user_agent], accept_language: "en-us")
|
124
|
-
|
125
124
|
ins.execute(
|
126
125
|
hash[:datetime].iso8601,
|
127
126
|
hash[:remote_host],
|
@@ -140,17 +139,14 @@ module ApacheLogReport
|
|
140
139
|
(ua.platform.name || ""),
|
141
140
|
(ua.platform.version || "")
|
142
141
|
)
|
142
|
+
rescue
|
143
|
+
STDERR.puts "Apache Log parser error: could not parse #{line}"
|
143
144
|
end
|
144
|
-
|
145
|
-
|
145
|
+
end
|
146
|
+
|
146
147
|
db
|
147
148
|
end
|
148
149
|
|
149
|
-
|
150
|
-
def self.reasonable_response_type ext
|
151
|
-
|
152
|
-
end
|
153
|
-
|
154
150
|
#
|
155
151
|
# take a sqlite3 databae and analyze data
|
156
152
|
#
|