Commit 8382156c authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'tc-geo-log-admin-page' into 'master'

Show geo.log in the Admin area

See merge request !2845
parents 4197a0c0 8f41a734
class Admin::LogsController < Admin::ApplicationController class Admin::LogsController < Admin::ApplicationController
prepend EE::Admin::LogsController
before_action :loggers
def show def show
@loggers = [ end
private
def loggers
@loggers ||= [
Gitlab::AppLogger, Gitlab::AppLogger,
Gitlab::GitLogger, Gitlab::GitLogger,
Gitlab::EnvironmentLogger, Gitlab::EnvironmentLogger,
......
---
title: Show geo.log in the Admin area
merge_request: 2845
author:
type: added
module EE::Admin::LogsController
def loggers
raise NotImplementedError unless defined?(super)
@loggers ||= super + [
Gitlab::GeoLogger
]
end
end
module Gitlab
class GeoLogger < Gitlab::Logger
def self.file_name_noext
'geo'
end
end
end
require 'spec_helper'
describe 'Admin browses logs' do
before do
sign_in(create(:admin))
end
it 'shows available log files' do
visit admin_logs_path
expect(page).to have_link 'geo.log'
end
end
...@@ -8,8 +8,10 @@ describe 'Admin browses logs' do ...@@ -8,8 +8,10 @@ describe 'Admin browses logs' do
it 'shows available log files' do it 'shows available log files' do
visit admin_logs_path visit admin_logs_path
expect(page).to have_content 'test.log' expect(page).to have_link 'application.log'
expect(page).to have_content 'githost.log' expect(page).to have_link 'githost.log'
expect(page).to have_content 'application.log' expect(page).to have_link 'test.log'
expect(page).to have_link 'sidekiq.log'
expect(page).to have_link 'repocheck.log'
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment