Browse Source

Merge branch 'python' of github.com:rtCamp/easyengine into python

bugfixes
harshadyeola 10 years ago
parent
commit
69d80779f0
  1. 22
      ee/cli/plugins/debug.py
  2. 1
      ee/cli/plugins/stack.py

22
ee/cli/plugins/debug.py

@ -7,6 +7,7 @@ from ee.core.mysql import EEMysql
from ee.core.services import EEService
from ee.core.logging import Log
import os
import configparser
def debug_plugin_hook(app):
@ -170,9 +171,13 @@ class EEDebugController(CementBaseController):
if not EEShellExec.cmd_exec(self, "grep \"log_level = debug\" "
"/etc/php5/fpm/php-fpm.conf"):
Log.info(self, "Setting up PHP5-FPM log_level = debug")
EEShellExec.cmd_exec(self, "sed -i \"s\';log_level.*\'log_"
"level = debug\'\" /etc/php5/fpm"
"/php-fpm.conf")
config = configparser.ConfigParser()
config.read('/etc/php5/fpm/php-fpm.conf')
config['global']['log_level'] = 'debug'
with open('/etc/php5/fpm/php-fpm.conf', 'w') as configfile:
Log.debug(self, "writting php5 configuration into "
"/etc/php5/fpm/php-fpm.conf")
config.write(configfile)
self.trigger_php = True
else:
Log.info(self, "PHP5-FPM log_level = debug already setup")
@ -183,9 +188,14 @@ class EEDebugController(CementBaseController):
if EEShellExec.cmd_exec(self, "grep \"log_level = debug\" "
"/etc/php5/fpm/php-fpm.conf"):
Log.info(self, "Disabling PHP5-FPM log_level = debug")
EEShellExec.cmd_exec(self, "sed -i \"s\'log_level.*\';log_"
"level = notice\'\" /etc/php5/fpm"
"/php-fpm.conf")
config = configparser.ConfigParser()
config.read('/etc/php5/fpm/php-fpm.conf')
config['global']['log_level'] = 'notice'
with open('/etc/php5/fpm/php-fpm.conf', 'w') as configfile:
Log.debug(self, "writting php5 configuration into "
"/etc/php5/fpm/php-fpm.conf")
config.write(configfile)
self.trigger_php = True
else:
Log.info(self, "PHP5-FPM log_level = debug already disabled")

1
ee/cli/plugins/stack.py

@ -353,6 +353,7 @@ class EEStackController(CementBaseController):
config = configparser.ConfigParser()
config.read('/etc/php5/fpm/php-fpm.conf')
config['global']['error_log'] = '/var/log/php5/fpm.log'
config['global']['log_level'] = 'notice'
with open('/etc/php5/fpm/php-fpm.conf', 'w') as configfile:
Log.debug(self, "writting php5 configuration into "
"/etc/php5/fpm/php-fpm.conf")

Loading…
Cancel
Save