forked from bofh/fetsite
log file view
This commit is contained in:
@@ -26,7 +26,16 @@ class HomeController < ApplicationController
|
|||||||
|
|
||||||
|
|
||||||
end
|
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
|
def startdev
|
||||||
render 'setup_fetsite_dev'
|
render 'setup_fetsite_dev'
|
||||||
end
|
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 'linksnotimplemented'
|
||||||
get 'kontakt'
|
get 'kontakt'
|
||||||
get 'choose_contact_topics'
|
get 'choose_contact_topics'
|
||||||
|
get 'log'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user