mirror of
https://github.com/fluent/fluentd-ui.git
synced 2025-08-11 16:57:11 +02:00
Fix to zip fluentd-ui log when FLUENTD_UI_PATH given
This commit is contained in:
parent
8bd2961232
commit
a6d11053d4
@ -39,7 +39,11 @@ class MiscController < ApplicationController
|
||||
|
||||
Zip::File.open(path, Zip::File::CREATE) do |zip|
|
||||
zip.get_output_stream('fluentd.log') {|f| f.puts fluentd.agent.log }
|
||||
zip.add("fluentd-ui.log", Rails.root.join("log/#{Rails.env}.log"))
|
||||
if ENV["FLUENTD_UI_LOG_PATH"].present?
|
||||
zip.add("fluentd-ui.log", ENV["FLUENTD_UI_LOG_PATH"])
|
||||
else
|
||||
zip.add("fluentd-ui.log", Rails.root.join("log/#{Rails.env}.log"))
|
||||
end
|
||||
zip.get_output_stream('env.txt') do |f|
|
||||
ENV.to_a.each do |(key, value)|
|
||||
f.puts "#{key}=#{value}"
|
||||
|
Loading…
Reference in New Issue
Block a user