瀏覽代碼

Cause capturefile to be rotated (don't fill up disk with garbage if we miss an end tag).

Chris McDonough 18 年之前
父節點
當前提交
6be5c693be
共有 2 個文件被更改,包括 5 次插入4 次删除
  1. 2 3
      TODO.txt
  2. 3 1
      src/supervisor/dispatchers.py

+ 2 - 3
TODO.txt

@@ -1,10 +1,9 @@
-- Support groups in supervisorctl / web interface.
+- Support stopping and starting groups in supervisorctl / web
+  interface.
 
 - Expose stderr/stdout logfiles separately in RPC interface return
   values.
 
-- Capturefile rotation?
-
 - Revisit test_startProcessGroup and test_startAllProcesses (see XXX
   comment about ordering).
 

+ 3 - 1
src/supervisor/dispatchers.py

@@ -70,7 +70,9 @@ class POutputDispatcher(PDispatcher):
                 capturefile,
                 logging.INFO,
                 '%(message)s',
-                rotating=False)
+                rotating=True,
+                maxbytes=1 << 21, #2MB
+                backups=10)
 
         self.childlog = self.mainlog