Skip to content
This repository was archived by the owner on Jul 24, 2020. It is now read-only.

Commit 75d1691

Browse files
committed
Rotate log files after 150 MB (retain 5)
Resolves #1743
1 parent a3aee36 commit 75d1691

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
* This file will be updated whenever a new release is put into production.
33
* Any problems should be reported via the "report an issue" link in the footer of the application.
44

5-
## v6.3.4 - 2018-08-03
5+
## v6.3.4 - 2018-08-10
66
### Changed
7+
* Log files now rotate properly, limited to 150 MB/file with 5 files retained ([#1743](https://github.com/YaleSTC/reservations/issues/1743)).
78
* Allowed for bulk-updating of user roles with a csv import with just usernames ([#1748](https://github.com/YaleSTC/reservations/issues/1748)).
89

910
### Fixed

config/environments/production.rb

+5-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@
6565

6666
# Use the lowest log level to ensure availability of diagnostic information
6767
# when problems arise.
68-
config.log_level = :debug
68+
config.log_level = :info
69+
70+
# Rotate logs after 150 MB, keep 5 files
71+
# See https://medium.com/@atinders/easy-log-rotation-with-rails-5-7b8d3c173461
72+
config.logger = Logger.new(config.paths['log'].first, 5, 150.megabytes)
6973

7074
# Prepend all log lines with the following tags.
7175
# config.log_tags = [ :subdomain, :uuid ]

0 commit comments

Comments
 (0)