bin/remote_syslog in remote_syslog-1.1.0 vs bin/remote_syslog in remote_syslog-1.1.1
- old
+ new
@@ -82,10 +82,13 @@
files += config['files']
if config['destination']
options[:dest_host] = config['destination']['host'] if config['destination']['host']
options[:dest_port] = config['destination']['port'] if config['destination']['port']
end
+ if config['hostname']
+ options[:hostname] = config['hostname']
+ end
elsif files.empty?
puts "No filenames provided and #{options[:configfile]} not found."
puts ''
puts op
exit
@@ -101,10 +104,11 @@
files.each do |path|
begin
EventMachine::file_tail(File.expand_path(path), RemoteSyslog::Reader,
options[:dest_host], options[:dest_port],
:socket => socket, :facility => options[:facility],
- :severity => options[:severity], :strip_color => options[:strip_color])
+ :severity => options[:severity], :strip_color => options[:strip_color],
+ :hostname => options[:hostname])
rescue Errno::ENOENT => e
puts "#{File.expand_path(path)} not found, continuing. (#{e.message})"
end
end