def TestLoggers(self, msg, args): Logger.LM_GEN1(Logger.L_INFO, "Loggers.py: LM_GEN1: msg: %s" % str(args)) Logger.LM_GEN2(Logger.L_INFO, Logger.DEFAULT_FACILITY, "Loggers.py: LM_GEN2: msg: %s" % str(args)) Logger.LM_ALERT( "Loggers.py: LM_ALERT: msg: %s" % str(args)) Logger.LM_CRIT( "Loggers.py: LM_CRIT: msg: %s" % str(args)) Logger.LM_ERR( "Loggers.py: LM_ERR: msg: %s" % str(args)) Logger.LM_WARN( "Loggers.py: LM_WARN: msg: %s" % str(args)) Logger.LM_NOTICE( "Loggers.py: LM_NOTICE: msg: %s" % str(args)) Logger.LM_INFO( "Loggers.py: LM_INFO: msg: %s" % str(args)) Logger.LM_DBG( "Loggers.py: LM_DBG: msg: %s" % str(args)) return 1
def dumpObj(obj): for attr in dir(obj): # KSR.info("obj.%s = %s\n" % (attr, getattr(obj, attr))); Logger.LM_INFO("obj.%s = %s\n" % (attr, getattr(obj, attr)));
def child_init(self, rank): if rank == Ranks.PROC_MAIN: Logger.LM_ERR("rank is PROC_MAIN") elif rank == Ranks.PROC_TIMER: Logger.LM_ERR("rank is PROC_TIMER") elif rank == Ranks.PROC_RPC: Logger.LM_ERR("rank is PROC_RPC") elif rank == Ranks.PROC_FIFO: Logger.LM_ERR("rank is PROC_FIFO") elif rank == Ranks.PROC_TCP_MAIN: Logger.LM_ERR("rank is PROC_TCP_MAIN") elif rank == Ranks.PROC_UNIXSOCK: Logger.LM_ERR("rank is PROC_UNIXSOCK") elif rank == Ranks.PROC_ATTENDANT: Logger.LM_ERR("rank is PROC_ATTENDANT") elif rank == Ranks.PROC_INIT: Logger.LM_ERR("rank is PROC_INIT") elif rank == Ranks.PROC_NOCHLDINIT: Logger.LM_ERR("rank is PROC_NOCHLDINIT") elif rank == Ranks.PROC_SIPINIT: Logger.LM_ERR("rank is PROC_SIPINIT") elif rank == Ranks.PROC_SIPRPC: Logger.LM_ERR("rank is PROC_SIPRPC") elif rank == Ranks.PROC_MIN: Logger.LM_ERR("rank is PROC_MIN") return 0