<s> from __future__ import print_function <EOL> from __future__ import unicode_literals <EOL> import sys <EOL> import logging <EOL> from marrow . script import Parser <EOL> class Service ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , verbose = False , quiet = False ) : <EOL> if verbose and quiet : <EOL> print ( "<STR_LIT>" ) <EOL> return <NUM_LIT:1> <EOL> logging . basicConfig ( level = logging . DEBUG if verbose else logging . WARN if quiet else logging . INFO ) <EOL> self . log = logging . getLogger ( __name__ ) <EOL> self . log . info ( "<STR_LIT>" ) <EOL> def start ( self , config = None , app = None ) : <EOL> """<STR_LIT>""" <EOL> self . log . info ( "<STR_LIT>" , <EOL> app if app else "<STR_LIT>" , <EOL> config if config else '<STR_LIT:default>' , <EOL> '<STR_LIT>' if config else '<STR_LIT>' ) <EOL> def stop ( self , config = None ) : <EOL> self . log . info ( "<STR_LIT>" ) <EOL> def restart ( self , config = None , app = None ) : <EOL> self . stop ( config ) <EOL> self . start ( config , app ) <EOL> def reload ( self , config = None ) : <EOL> self . log . info ( "<STR_LIT>" ) <EOL> sys . exit ( Parser ( Service ) ( sys . argv [ <NUM_LIT:1> : ] ) ) </s>
