Explorar el Código

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

Chris McDonough hace 18 años
padre
commit
6be5c693be
Se han modificado 2 ficheros con 5 adiciones y 4 borrados
  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