]> www.vanbest.org Git - motioneye-debian/commitdiff
motion debug level is now set according to settings.LOG_LEVEL
authorCalin Crisan <ccrisan@gmail.com>
Thu, 21 Aug 2014 17:34:47 +0000 (20:34 +0300)
committerCalin Crisan <ccrisan@gmail.com>
Thu, 21 Aug 2014 17:34:47 +0000 (20:34 +0300)
src/motionctl.py

index 16a3def74d0a8a36dff771965603de5ced9aa3a2..f29e23bde4f624cd73fc7a800503bf93cb9495e7 100644 (file)
@@ -71,7 +71,14 @@ def start():
     
     args = [program,
             '-c', motion_config_path,
-            '-n']
+            '-n',
+            '-d']
+    
+    if settings.LOG_LEVEL == logging.DEBUG:
+        args.append('9')
+    
+    else:
+        args.append('1')
 
     log_file = open(motion_log_path, 'w')