def __call__(self, customlevel):
<EOL>logging.addLevelName(self.level, self.name)<EOL>def _wrapper(msg, *args, **kwargs):<EOL><INDENT>if self.logger.isEnabledFor(level):<EOL><INDENT>_msg, _args, _kwargs = customlevel(self.logger, msg, *args, **kwargs)<EOL>self.logger.log(level, _msg, *_args, **_kwargs)<EOL><DEDENT><DEDENT>setattr(self.logger, self.name.lower(), _wrapper)<EOL>if self.logger_name is None:<EOL><INDENT>setattr(logging, self.name.lower(), _wrapper)<EOL><DEDENT>return customlevel<EOL>
Wrap the decorated function to take care of the setting up of the custom log level.