lib/remote_syslog/reader.rb in remote_syslog-1.6.2 vs lib/remote_syslog/reader.rb in remote_syslog-1.6.3
- old
+ new
@@ -18,10 +18,11 @@
super(path, -1)
@parse_fields = options[:parse_fields]
@strip_color = options[:strip_color]
@exclude_pattern = options[:exclude_pattern]
+ @max_message_size = options[:max_message_size] || 1024
@socket = options[:socket] || UdpEndpoint.new(destination_address, destination_port)
@buffer = BufferedTokenizer.new
@@ -70,10 +71,10 @@
packet.tag = $3 if $3 && $3 != ''
packet.content = $4 if $4 && $4 != ''
end
end
- @socket.write(packet.assemble)
+ @socket.write(packet.assemble(@max_message_size))
end
def on_exception(exception)
puts "Exception: #{exception.class}: #{exception.message}\n\t#{exception.backtrace.join("\n\t")}"
end