diff --git a/wo/cli/plugins/debug.py b/wo/cli/plugins/debug.py index 6607ecb..649cfea 100644 --- a/wo/cli/plugins/debug.py +++ b/wo/cli/plugins/debug.py @@ -3,7 +3,7 @@ from cement.core.controller import CementBaseController, expose from cement.core import handler, hook from wo.core.aptget import WOAptGet -from wo.core.shellexec import * +from wo.core.shellexec import WOShellExec from wo.core.mysql import WOMysql from wo.core.services import WOService from wo.core.logging import Log @@ -92,6 +92,7 @@ class WODebugController(CementBaseController): debug_address = (self.app.config.get('stack', 'ip-address') .split()) except Exception as e: + Log.debug(self, "{0}".format(e)) debug_address = ['0.0.0.0/0'] # Check if IP address is 127.0.0.1 then enable debug globally @@ -660,6 +661,7 @@ class WODebugController(CementBaseController): try: cron_time = int(self.app.pargs.interval) except Exception as e: + Log.debug(self, "{0}".format(e)) cron_time = 5 try: diff --git a/wo/cli/plugins/info.py b/wo/cli/plugins/info.py index 2e9833d..d5daaac 100644 --- a/wo/cli/plugins/info.py +++ b/wo/cli/plugins/info.py @@ -93,6 +93,7 @@ class WOInfoController(CementBaseController): www_xdebug = (config['www']['php_admin_flag[xdebug.profiler_enable' '_trigger]']) except Exception as e: + Log.debug(self, "{0}".format(e)) www_xdebug = 'off' config.read('/etc/{0}/fpm/pool.d/debug.conf'.format("php/7.2")) @@ -111,6 +112,7 @@ class WOInfoController(CementBaseController): debug_xdebug = (config['debug']['php_admin_flag[xdebug.profiler_' 'enable_trigger]']) except Exception as e: + Log.debug(self, "{0}".format(e)) debug_xdebug = 'off' data = dict(version=version, expose_php=expose_php, @@ -168,6 +170,7 @@ class WOInfoController(CementBaseController): www_xdebug = (config['www']['php_admin_flag[xdebug.profiler_enable' '_trigger]']) except Exception as e: + Log.debug(self, "{0}".format(e)) www_xdebug = 'off' config.read('/etc/php/7.3/fpm/pool.d/debug.conf') @@ -186,6 +189,7 @@ class WOInfoController(CementBaseController): debug_xdebug = (config['debug']['php_admin_flag[xdebug.profiler_' 'enable_trigger]']) except Exception as e: + Log.debug(self, "{0}".format(e)) debug_xdebug = 'off' data = dict(version=version, expose_php=expose_php, diff --git a/wo/cli/plugins/log.py b/wo/cli/plugins/log.py index 5b08189..7baf633 100644 --- a/wo/cli/plugins/log.py +++ b/wo/cli/plugins/log.py @@ -97,7 +97,7 @@ class WOLogShowController(CementBaseController): '/var/log/php5/fpm.log'] if self.app.pargs.mysql: # MySQL debug will not work for remote MySQL - if WOVariables.wo_mysql_host is "localhost": + if WOVariables.wo_mysql_host == "localhost": if os.path.isfile('/var/log/mysql/mysql-slow.log'): self.msg = self.msg + ['/var/log/mysql/mysql-slow.log'] else: @@ -236,7 +236,7 @@ class WOLogResetController(CementBaseController): '/var/log/php5/fpm.log'] if self.app.pargs.mysql: # MySQL debug will not work for remote MySQL - if WOVariables.wo_mysql_host is "localhost": + if WOVariables.wo_mysql_host == "localhost": if os.path.isfile('/var/log/mysql/mysql-slow.log'): self.msg = self.msg + ['/var/log/mysql/mysql-slow.log'] else: @@ -364,7 +364,7 @@ class WOLogGzipController(CementBaseController): '/var/log/php5/fpm.log'] if self.app.pargs.mysql: # MySQL debug will not work for remote MySQL - if WOVariables.wo_mysql_host is "localhost": + if WOVariables.wo_mysql_host == "localhost": if os.path.isfile('/var/log/mysql/mysql-slow.log'): self.msg = self.msg + ['/var/log/mysql/mysql-slow.log'] else: @@ -502,7 +502,7 @@ class WOLogMailController(CementBaseController): '/var/log/php5/fpm.log'] if self.app.pargs.mysql: # MySQL debug will not work for remote MySQL - if WOVariables.wo_mysql_host is "localhost": + if WOVariables.wo_mysql_host == "localhost": if os.path.isfile('/var/log/mysql/mysql-slow.log'): self.msg = self.msg + ['/var/log/mysql/mysql-slow.log'] else: