コード例 #1
0
 def logDataToTopic(self, level, code, data):
     log_data=Log()
     log_data.NodeID = 3
     log_data.CodeID = code
     log_data.Level = level
     log_data.Text = data
     self.log_topic.publish(log_data)
コード例 #2
0
def log_it(level, code, logMessage):

    logEntry = Log()
    logEntry.CodeID = code
    logEntry.NodeID = 2
    logEntry.Text = logMessage

    pub_log.publish(logEntry)
コード例 #3
0
ファイル: OrderQ.py プロジェクト: sdu-rsd-group1/FroboMind
def log_it(level, code, logMessage):

    logEntry = Log()
    logEntry.CodeID = code
    logEntry.NodeID = 2
    logEntry.Text = logMessage

    pub_log.publish(logEntry)
コード例 #4
0
 def logDataToTopic(self, level, code, data):
     log_data = Log()
     log_data.NodeID = 3
     log_data.CodeID = code
     log_data.Level = level
     log_data.Text = data
     self.log_topic.publish(log_data)
コード例 #5
0
def publishToLog(level, code, logMessage):
    #-------------------publish list of bricks---------------------------------------------------------------------
    #Node ID = 2
    #level = 0 = debug, 1 = operation
    logEntry = Log()
    logEntry.CodeID = code
    logEntry.NodeID = 2
    logEntry.Text = logMessage

    if level == "operation":
        logEntry.Level = 1
    elif level == "debug":
        logEntry.Level = 0
    else:
        print "Invalid loglevel:"
        print level
        return

    pubLog.publish(logEntry)

    return
コード例 #6
0
def publishToLog(level, code, logMessage):
    #-------------------publish list of bricks---------------------------------------------------------------------
    #Node ID = 2
    #level = 0 = debug, 1 = operation
    logEntry = Log()
    logEntry.CodeID = code
    logEntry.NodeID = 2
    logEntry.Text = logMessage

    if level == "operation":
        logEntry.Level = 1
    elif level == "debug":
        logEntry.Level = 0
    else:
        print "Invalid loglevel:"
        print level
        return

    pubLog.publish(logEntry)

    return