lib/tailog.rb in tailog-0.2.0 vs lib/tailog.rb in tailog-0.2.1
- old
+ new
@@ -40,19 +40,23 @@
file_path = File.join Tailog.log_path, params[:file]
file = File.open file_path
file_size = file.size
seek = params[:seek] && params[:seek][Tailog.server_uuid] || file_size
file.seek seek.to_i
- content = erb :'logs/list', locals: { file: file }
+ content = erb :'logs/list', locals: { file: file }, layout: false
file.close
rescue => error
- content = erb :error, locals: { error: error }
+ content = erb :error, locals: { error: error }, layout: false
end
{
server_uuid: Tailog.server_uuid,
file_size: file_size,
content: content
}.to_json
+ end
+
+ get '/env' do
+ erb :env
end
end
end