diff options
author | Lukas Erlacher <erlacher@in.tum.de> | 2016-10-29 17:10:41 +0200 |
---|---|---|
committer | Lukas Erlacher <erlacher@in.tum.de> | 2016-11-03 22:02:47 +0100 |
commit | e900e53aa530ce15a73a4bf88cafa304999a99e9 (patch) | |
tree | e1bcb69438728a437e11dfdc054173860144fcab /lib/gitlab/environment_logger.rb | |
parent | cc83039a7044cf2c51c9909a11fd6dd422f88b8c (diff) | |
download | gitlab-ce-e900e53aa530ce15a73a4bf88cafa304999a99e9.tar.gz |
Show log corresponding to env in admin/logs
No matter which environment Gitlab was running as, the admin/logs view
always showed production.log. This commit selects the logfile based
on Rails.env.
- Rename ProductionLogger to EnvironmentLogger
- Make EnvironmentLogger logfile depend on env
- Update spinach test for log tabs
Diffstat (limited to 'lib/gitlab/environment_logger.rb')
-rw-r--r-- | lib/gitlab/environment_logger.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/gitlab/environment_logger.rb b/lib/gitlab/environment_logger.rb new file mode 100644 index 00000000000..407cc572656 --- /dev/null +++ b/lib/gitlab/environment_logger.rb @@ -0,0 +1,7 @@ +module Gitlab + class EnvironmentLogger < Gitlab::Logger + def self.file_name_noext + Rails.env + end + end +end |