[docs]classKernelLogger(Component):""" This components a python logger from within artiq """def__init__(self,*args,**kwargs):self.logger=logging.getLogger(__name__)super().__init__(*args,**kwargs)
[docs]@rpc(flags={"async"})defdebug(self,msg,vars=[]):""" Logs a message with level DEBUG. :param obj msg: what to log """self.logger.debug(msg_str(msg,vars))
[docs]@rpc(flags={"async"})definfo(self,msg,vars=[]):""" Logs a message with level INFO. :param obj msg: what to log """self.logger.info(msg_str(msg,vars))
[docs]@rpc(flags={"async"})defwarning(self,msg,vars=[]):""" Logs a message with level WARNING. :param obj msg: what to log """self.logger.warning(msg_str(msg,vars))
[docs]@rpc(flags={"async"})deferror(self,msg,vars=[]):""" Logs a message with level ERROR. :param obj msg: what to log """self.logger.error(msg_str(msg,vars))
[docs]@rpc(flags={"async"})defcritical(self,msg,vars=[]):""" Logs a message with level CRITICAL. :param obj msg: what to log """self.logger.critical(msg_str(msg,vars))