ipcad2squid 1.1.2 → 1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/ipcad2squid.gemspec +1 -1
- data/lib/ipcad2squid.rb +1 -0
- metadata +1 -1
data/ipcad2squid.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'ipcad2squid'
|
3
|
-
s.version = '1.
|
3
|
+
s.version = '1.2'
|
4
4
|
s.date = '2013-01-03'
|
5
5
|
s.summary = "Convert ipcad logs to squid logs"
|
6
6
|
s.description = "Simple gem for converting and appending output from ipcad to squid logs formats"
|
data/lib/ipcad2squid.rb
CHANGED
@@ -22,6 +22,7 @@ class Ipcad2squid
|
|
22
22
|
# parse and output data
|
23
23
|
accounting_data.map do |raw_data|
|
24
24
|
data = raw_data.split
|
25
|
+
next unless data[1] =~ /#{@net}/
|
25
26
|
"#{@ttime}.000 1 #{data[1]} TCP_MISS/200 #{data[3]} CONNECT #{data[0]}:#{data[4]} - DIRECT/#{data[1]} -"
|
26
27
|
end.join("\n")
|
27
28
|
end
|