OSDN Git Service

log rotation
authorAkihiro Ono <a-ono@users.sourceforge.jp>
Sat, 12 Feb 2011 14:03:38 +0000 (23:03 +0900)
committerAkihiro Ono <a-ono@users.sourceforge.jp>
Sat, 12 Feb 2011 14:03:38 +0000 (23:03 +0900)
template/apache/conf/httpd.conf.erb
template/hudson/hudson.xml.erb
template/redmine/config/additional_environment.rb.erb [new file with mode: 0644]

index e781652..a785f70 100644 (file)
@@ -256,7 +256,7 @@ DocumentRoot "<%= apache_root %>/htdocs"
 # logged here.  If you *do* define an error logfile for a <VirtualHost>\r
 # container, that host's errors will be logged there and not here.\r
 #\r
-ErrorLog "logs/error.log"\r
+ErrorLog "| bin/rotatelogs logs/error.log 1M"\r
 \r
 #\r
 # LogLevel: Control the number of messages logged to the error_log.\r
@@ -285,7 +285,7 @@ LogLevel warn
     # define per-<VirtualHost> access logfiles, transactions will be\r
     # logged therein and *not* in this file.\r
     #\r
-    CustomLog "logs/access.log" common\r
+    CustomLog "| bin/rotatelogs logs/access.log 1M" common\r
 \r
     #\r
     # If you prefer a logfile with access, agent, and referer information\r
index 5c93b8a..42ff229 100644 (file)
@@ -44,6 +44,6 @@ THE SOFTWARE.
     I'm still debugging this.\r
   <interactive />\r
   -->\r
-  <logmode>rotate</logmode>\r
+  <logmode>roll</logmode>\r
        <logpath><%= File.join(home, "hudson/log") %></logpath>\r
 </service>\r
diff --git a/template/redmine/config/additional_environment.rb.erb b/template/redmine/config/additional_environment.rb.erb
new file mode 100644 (file)
index 0000000..23743be
--- /dev/null
@@ -0,0 +1,3 @@
+config.active_record.colorize_logging = false
+config.logger = Logger.new(config.log_path, 5, 1.megabytes)
+config.logger.level = Logger::INFO