Browse Source

Better commit messges

bugfixes
gau1991 10 years ago
parent
commit
0947c80c29
  1. 21
      ee/cli/plugins/debug.py

21
ee/cli/plugins/debug.py

@ -70,7 +70,7 @@ class EEDebugController(CementBaseController):
if not self.trigger_nginx: if not self.trigger_nginx:
Log.info(self, "Nginx debug connection already enabled") Log.info(self, "Nginx debug connection already enabled")
self.msg = self.msg + [" /var/log/nginx/*.error.log"] self.msg = self.msg + ["/var/log/nginx/*.error.log"]
# stop global debug # stop global debug
elif not self.start and not self.app.pargs.site_name: elif not self.start and not self.app.pargs.site_name:
@ -99,7 +99,7 @@ class EEDebugController(CementBaseController):
else: else:
Log.info(self, "Debug for site allready enabled") Log.info(self, "Debug for site allready enabled")
self.msg = self.msg + ['/var/www//logs/error.log' self.msg = self.msg + ['/var/www/{0}/logs/error.log'
.format(self.app.pargs.site_name)] .format(self.app.pargs.site_name)]
else: else:
@ -143,6 +143,7 @@ class EEDebugController(CementBaseController):
self.app.render((data), 'upstream.mustache', out=ee_nginx) self.app.render((data), 'upstream.mustache', out=ee_nginx)
ee_nginx.close() ee_nginx.close()
self.trigger_php = True self.trigger_php = True
self.trigger_nginx = True
else: else:
Log.info(self, "PHP debug is allready enabled") Log.info(self, "PHP debug is allready enabled")
@ -161,6 +162,7 @@ class EEDebugController(CementBaseController):
self.app.render((data), 'upstream.mustache', out=ee_nginx) self.app.render((data), 'upstream.mustache', out=ee_nginx)
ee_nginx.close() ee_nginx.close()
self.trigger_php = True self.trigger_php = True
self.trigger_nginx = True
else: else:
Log.info(self, "PHP debug is allready disabled") Log.info(self, "PHP debug is allready disabled")
@ -185,6 +187,7 @@ class EEDebugController(CementBaseController):
Log.info(self, "PHP5-FPM log_level = debug already setup") Log.info(self, "PHP5-FPM log_level = debug already setup")
self.msg = self.msg + ['/var/log/php5/fpm.log'] self.msg = self.msg + ['/var/log/php5/fpm.log']
# PHP5-FPM stop global debug # PHP5-FPM stop global debug
else: else:
if EEShellExec.cmd_exec(self, "grep \"log_level = debug\" " if EEShellExec.cmd_exec(self, "grep \"log_level = debug\" "
@ -280,6 +283,11 @@ class EEDebugController(CementBaseController):
.format(webroot)) .format(webroot))
else: else:
Log.info(self, "WordPress debug log already enabled") Log.info(self, "WordPress debug log already enabled")
self.msg = self.msg + ['/var/www/{0}/htdocs/wp-content'
'/debug.log'
.format(self.app.pargs.site_name)]
else: else:
Log.info(self, "{0} domain not valid" Log.info(self, "{0} domain not valid"
.format(self.app.pargs.site_name)) .format(self.app.pargs.site_name))
@ -425,10 +433,11 @@ class EEDebugController(CementBaseController):
# Reload PHP # Reload PHP
if self.trigger_php: if self.trigger_php:
EEService.reload_service(self, 'php5-fpm') EEService.reload_service(self, 'php5-fpm')
#
# if len(self.msg) > 0: if len(self.msg) > 0:
# self.app.log.info("Use following command to check debug logs:" disp_msg = ' '.join(self.msg)
# "\n{0}".format(self.msg.join())) Log.info(self, "Use following command to check debug logs:\n"
+ Log.ENDC + "tail -f {0}".format(disp_msg))
def load(app): def load(app):

Loading…
Cancel
Save