Add debug log
This commit is contained in:
@@ -88,8 +88,8 @@ class WOCleanController(CementBaseController):
|
|||||||
def clean_opcache(self):
|
def clean_opcache(self):
|
||||||
try:
|
try:
|
||||||
Log.info(self, "Cleaning opcache")
|
Log.info(self, "Cleaning opcache")
|
||||||
wp = urllib.request.urlopen(" https://127.0.0.1:22222/cache"
|
urllib.request.urlopen(" https://127.0.0.1:22222/cache"
|
||||||
"/opcache/opgui.php?reset=1").read()
|
"/opcache/opgui.php?reset=1").read()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
Log.debug(self, "{0}".format(e))
|
Log.debug(self, "{0}".format(e))
|
||||||
Log.debug(self, "Unable hit url, "
|
Log.debug(self, "Unable hit url, "
|
||||||
|
|||||||
@@ -113,6 +113,7 @@ class WOSecureController(CementBaseController):
|
|||||||
try:
|
try:
|
||||||
user_ip = self.app.pargs.user_input.split(',')
|
user_ip = self.app.pargs.user_input.split(',')
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Log.debug(self, "{0}".format(e))
|
||||||
user_ip = ['127.0.0.1']
|
user_ip = ['127.0.0.1']
|
||||||
for ip_addr in user_ip:
|
for ip_addr in user_ip:
|
||||||
if not ("exist_ip_address "+ip_addr in open('/etc/nginx/common/'
|
if not ("exist_ip_address "+ip_addr in open('/etc/nginx/common/'
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ class WOStackController(CementBaseController):
|
|||||||
log=False)
|
log=False)
|
||||||
except CommandExecutionError as e:
|
except CommandExecutionError as e:
|
||||||
Log.debug(self, "{0}".format(e))
|
Log.debug(self, "{0}".format(e))
|
||||||
Log.error("Failed to initialize MySQL package")
|
Log.error(self, "Failed to initialize MySQL package")
|
||||||
# generate my.cnf root credentials
|
# generate my.cnf root credentials
|
||||||
mysql_config = """
|
mysql_config = """
|
||||||
[client]
|
[client]
|
||||||
@@ -1659,6 +1659,7 @@ class WOStackController(CementBaseController):
|
|||||||
'Anemometer']
|
'Anemometer']
|
||||||
]
|
]
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Log.debug(self, "{0}".format(e))
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if (apt_packages) or (packages):
|
if (apt_packages) or (packages):
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ class WOAptGet():
|
|||||||
stdout=sys.stdout).communicate()
|
stdout=sys.stdout).communicate()
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Log.debug(self, "{0}".format(e))
|
||||||
Log.error(self, "Unable to check for packages upgrades")
|
Log.error(self, "Unable to check for packages upgrades")
|
||||||
|
|
||||||
def dist_upgrade(self):
|
def dist_upgrade(self):
|
||||||
@@ -104,6 +105,7 @@ class WOAptGet():
|
|||||||
"`tail /var/log/wo/wordops.log` "
|
"`tail /var/log/wo/wordops.log` "
|
||||||
"and please try again...")
|
"and please try again...")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Log.debug(self, "{0}".format(e))
|
||||||
Log.error(self, "Error while installing packages, "
|
Log.error(self, "Error while installing packages, "
|
||||||
"apt-get exited with error")
|
"apt-get exited with error")
|
||||||
|
|
||||||
@@ -134,6 +136,7 @@ class WOAptGet():
|
|||||||
"and please try again...")
|
"and please try again...")
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Log.debug(self, "{0}".format(e))
|
||||||
Log.info(self, Log.FAIL + "Oops Something went "
|
Log.info(self, Log.FAIL + "Oops Something went "
|
||||||
"wrong!!")
|
"wrong!!")
|
||||||
Log.error(self, "Check the WordOps log for more details "
|
Log.error(self, "Check the WordOps log for more details "
|
||||||
@@ -167,6 +170,7 @@ class WOAptGet():
|
|||||||
"and please try again...")
|
"and please try again...")
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Log.debug(self, "{0}".format(e))
|
||||||
Log.error(self, "Error while installing packages, "
|
Log.error(self, "Error while installing packages, "
|
||||||
"apt-get exited with error")
|
"apt-get exited with error")
|
||||||
|
|
||||||
@@ -243,5 +247,6 @@ class WOAptGet():
|
|||||||
WORepo.remove(self, repo_url=repo_url)
|
WORepo.remove(self, repo_url=repo_url)
|
||||||
return False
|
return False
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Log.debug(self, "{0}".format(e))
|
||||||
Log.error(self, "Error while downloading packages, "
|
Log.error(self, "Error while downloading packages, "
|
||||||
"apt-get exited with error")
|
"apt-get exited with error")
|
||||||
|
|||||||
Reference in New Issue
Block a user