Browse Source

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

Chris McDonough 18 năm trước cách đây
mục cha
commit
6be5c693be
2 tập tin đã thay đổi với 5 bổ sung4 xóa
  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