hi,

>> +def command_log(*args, **kwargs):
>> +    def _log(f):
>> +        # XXX see the implementation of @command for command_name and __doc
>> +        def wrapper(self, params):
>> +            self.logger.info("command %s %s" % (wrapper.command_name, 
>> params))
>> +            f(self, params)
>> +        wrapper.__doc__ = f.__doc__
> 
> functools.wraps is better.

will do so.  thanks.

>> -    @command('set-log-level')
>> +    def __init__(self, request, client_address, server):
>> +        self.client_address = client_address
>> +        logger = logging.getLogger("ryu.app.Cli")
>> +        plogger = PrefixedLogger(logger, "CLI %s" % (client_address,))
>> +        self.logger = plogger  # for us
>> +        self.logging = plogger  # for TelnetHandler
>> +        TelnetHandler.__init__(self, request, client_address, server)
> 
> super().__init__() doesn't work?

no.  it's an old-style class.

YAMAMOTO Takashi

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to