示例#1
0
def log_level(args, **ignored):
    log = get_resource("log")
    if args:
        log._set_level(args[0])
    return "Log level at {0}".format(log.level_desc)
示例#2
0
 def main(self):
     get_resource(self.raw['service_id']).register(self.session, self.raw.get('data', None))
示例#3
0
 def main(self):
     get_resource(self.raw['service_id']).unregister(self.session)
示例#4
0
 def wrapper(*args, **kwargs):
     try:
         return func(*args, **kwargs)
     except Exception as error:
         get_resource("log").error("Unhandled exception", func, error)