Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timcharper/14967 to your computer and use it in GitHub Desktop.
Save timcharper/14967 to your computer and use it in GitHub Desktop.
From 57dc6a58baeed762981d1a28c0855e651c46982a Mon Sep 17 00:00:00 2001
From: Tim Harper <timcharper@gmail.com>
Date: Sat, 4 Oct 2008 10:05:49 -0600
Subject: [PATCH] add a sensible suffix to the log path, to get rid of all the of tiny unix epoch suffixed files
---
config/environments/production.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/config/environments/production.rb b/config/environments/production.rb
index c2cc654..9e2596f 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -8,7 +8,7 @@ config.cache_classes = true
# config.logger = SyslogLogger.new
# 10 MB logs
-config.logger = Logger.new(IO.popen("/usr/sbin/rotatelogs #{config.log_path} 10M", "a"))
+config.logger = Logger.new(IO.popen("/usr/sbin/rotatelogs #{config.log_path}.%Y-%m-%d 86400", "a"))
# Full error reports are disabled and caching is turned on
config.action_controller.consider_all_requests_local = false
--
1.6.0.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment