Browse Source

Refined ee log command

bugfixes
gau1991 10 years ago
parent
commit
7a871a22f5
  1. 18
      ee/cli/plugins/log.py

18
ee/cli/plugins/log.py

@ -22,9 +22,22 @@ def ee_log_hook(app):
class EELogController(CementBaseController): class EELogController(CementBaseController):
class Meta: class Meta:
label = 'log' label = 'log'
description = 'Show Nginx, PHP, MySQL log file' description = 'Perform operations on Nginx, PHP, MySQL log file'
stacked_on = 'base' stacked_on = 'base'
stacked_type = 'nested' stacked_type = 'nested'
usage = "ee log [<site_name>] [options]"
@expose(hide=True)
def default(self):
self.app.args.print_help()
class EELogShowController(CementBaseController):
class Meta:
label = 'show'
description = 'Show Nginx, PHP, MySQL log file'
stacked_on = 'log'
stacked_type = 'nested'
arguments = [ arguments = [
(['--all'], (['--all'],
dict(help='Show All logs file', action='store_true')), dict(help='Show All logs file', action='store_true')),
@ -46,7 +59,7 @@ class EELogController(CementBaseController):
(['site_name'], (['site_name'],
dict(help='Website Name', nargs='?', default=None)) dict(help='Website Name', nargs='?', default=None))
] ]
usage = "ee log [<site_name>] [options]" usage = "ee log show [<site_name>] [options]"
@expose(hide=True) @expose(hide=True)
def default(self): def default(self):
@ -529,6 +542,7 @@ class EELogMailController(CementBaseController):
def load(app): def load(app):
# register the plugin class.. this only happens if the plugin is enabled # register the plugin class.. this only happens if the plugin is enabled
handler.register(EELogController) handler.register(EELogController)
handler.register(EELogShowController)
handler.register(EELogResetController) handler.register(EELogResetController)
handler.register(EELogGzipController) handler.register(EELogGzipController)
handler.register(EELogMailController) handler.register(EELogMailController)

Loading…
Cancel
Save