forked from bofh/fetsite
log file view
This commit is contained in:
@@ -26,7 +26,16 @@ class HomeController < ApplicationController
|
||||
|
||||
|
||||
end
|
||||
|
||||
def log
|
||||
authorize! :doadmin, User
|
||||
lines = params[:lines]
|
||||
if Rails.env == "production"
|
||||
@logs = `tail -n #{lines} log/production.log | grep Error`
|
||||
else
|
||||
@logs = `tail -n #{lines} log/development.log | grep -v 'actionpack\\|railties\\|activesupport\\|::Translation'`
|
||||
end
|
||||
|
||||
end
|
||||
def startdev
|
||||
render 'setup_fetsite_dev'
|
||||
end
|
||||
|
||||
1
app/views/home/log.html.erb
Normal file
1
app/views/home/log.html.erb
Normal file
@@ -0,0 +1 @@
|
||||
<pre><%= @logs %></pre>
|
||||
@@ -135,6 +135,7 @@
|
||||
get 'linksnotimplemented'
|
||||
get 'kontakt'
|
||||
get 'choose_contact_topics'
|
||||
get 'log'
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user