Forráskód Böngészése

[core] Remove old shell logging

Romain Rigaux 12 éve
szülő
commit
6648026c8c

+ 2 - 22
desktop/conf.dist/log.conf

@@ -22,14 +22,6 @@ handlers=logfile,errorlog
 handlers=accesslog
 qualname=access
 
-[logger_shell_output]
-handlers=shell_output_log
-qualname=shell_output
-
-[logger_shell_input]
-handlers=shell_input_log
-qualname=shell_input
-
 # The logrotation limit is set at 5MB per file for a total of 5 copies.
 # I.e. 25MB for each set of logs.
 [handler_accesslog]
@@ -46,18 +38,6 @@ level=ERROR
 formatter=default
 args=('%LOG_DIR%/error.log', 'a', 5000000, 5)
 
-[handler_shell_output_log]
-class=handlers.RotatingFileHandler
-level=INFO
-formatter=default
-args=('%LOG_DIR%/shell_output.log', 'a', 5000000, 5)
-
-[handler_shell_input_log]
-class=handlers.RotatingFileHandler
-level=INFO
-formatter=default
-args=('%LOG_DIR%/shell_input.log', 'a', 5000000, 5)
-
 [formatter_default]
 format=[%(asctime)s] %(module)-12s %(levelname)-8s %(message)s
 datefmt=%d/%b/%Y %H:%M:%S +0000
@@ -67,10 +47,10 @@ format=[%(asctime)s] %(levelname)-8s %(message)s
 datefmt=%d/%b/%Y %H:%M:%S +0000
 
 [loggers]
-keys=root,access,shell_output,shell_input
+keys=root,access
 
 [handlers]
-keys=logfile,accesslog,errorlog,shell_output_log,shell_input_log
+keys=logfile,accesslog,errorlog
 
 [formatters]
 keys=default,access

+ 2 - 22
desktop/conf/log.conf

@@ -17,14 +17,6 @@ handlers=logfile,errorlog
 handlers=accesslog
 qualname=access
 
-[logger_shell_output]
-handlers=shell_output_log
-qualname=shell_output
-
-[logger_shell_input]
-handlers=shell_input_log
-qualname=shell_input
-
 [handler_stderr]
 class=StreamHandler
 formatter=default
@@ -51,18 +43,6 @@ level=DEBUG
 formatter=default
 args=('%LOG_DIR%/%PROC_NAME%.log', 'a', 1000000, 3)
 
-[handler_shell_output_log]
-class=handlers.RotatingFileHandler
-level=DEBUG
-formatter=default
-args=('%LOG_DIR%/shell_output.log', 'a', 1000000, 3)
-
-[handler_shell_input_log]
-class=handlers.RotatingFileHandler
-level=DEBUG
-formatter=default
-args=('%LOG_DIR%/shell_input.log', 'a', 1000000, 3)
-
 [formatter_default]
 format=[%(asctime)s] %(module)-12s %(levelname)-8s %(message)s
 datefmt=%d/%b/%Y %H:%M:%S +0000
@@ -77,10 +57,10 @@ datefmt=%d/%b/%Y %H:%M:%S +0000
 ########################################
 
 [loggers]
-keys=root,access,shell_output,shell_input
+keys=root,access
 
 [handlers]
-keys=stderr,logfile,accesslog,errorlog,shell_output_log,shell_input_log
+keys=stderr,logfile,accesslog,errorlog
 
 [formatters]
 keys=default,access

+ 2 - 1
desktop/core/src/desktop/log/__init__.py

@@ -52,6 +52,7 @@ def _read_log_conf(proc_name, log_dir):
       return proc_name
 
   log_conf = get_desktop_root('conf', 'log.conf')
+
   if not os.path.isfile(log_conf):
     return None
 
@@ -159,7 +160,7 @@ def basic_logging(proc_name, log_dir=None):
 def fancy_logging():
   """Configure logging into a buffer for /logs endpoint."""
   from log_buffer import FixedBufferHandler
-  BUFFER_SIZE = 10*1024*1024 # This is the size in characters, not bytes
+  BUFFER_SIZE = 10 * 1024 * 1024 # This is the size in characters, not bytes
   buffer_handler = FixedBufferHandler(BUFFER_SIZE)
   formatter = logging.Formatter(LOG_FORMAT, DATE_FORMAT)
   # We always want to catch all messages in our error report buffer

+ 1 - 1
desktop/core/src/desktop/settings.py

@@ -286,7 +286,7 @@ SESSION_COOKIE_HTTPONLY = desktop.conf.SESSION.HTTP_ONLY.get()
 TEST_RUNNER = 'desktop.lib.test_runners.HueTestRunner'
 # Turn off cache middleware
 if 'test' in sys.argv:
-   CACHE_MIDDLEWARE_SECONDS = 0
+  CACHE_MIDDLEWARE_SECONDS = 0
 
 TIME_ZONE = desktop.conf.TIME_ZONE.get()
 # Desktop supports only one authentication backend.