Commit 8f41a734 authored by Toon Claes's avatar Toon Claes

Show geo.log in the Admin area

Adds a tab button on the Admin Logs page (at /admin/logs), to display
geo.log, just like the tab buttons for application.log and others.

See !2845
parent 262cad49
class Admin::LogsController < Admin::ApplicationController
prepend EE::Admin::LogsController
before_action :loggers
def show
......
---
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
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