- self.xmlFile.add_simple_node("field", text=self.config.VARS.command , attrib={"name" : "command"})
- self.xmlFile.add_simple_node("field", text=self.config.INTERNAL.sat_version , attrib={"name" : "satversion"})
- self.xmlFile.add_simple_node("field", text=self.config.VARS.hostname , attrib={"name" : "hostname"})
- self.xmlFile.add_simple_node("field", text=self.config.VARS.dist , attrib={"name" : "OS"})
- self.xmlFile.add_simple_node("field", text=self.config.VARS.user , attrib={"name" : "user"})
- self.xmlFile.add_simple_node("field", text=self.config.VARS.datehour , attrib={"name" : "beginTime"})
- self.xmlFile.add_simple_node("traces",text="")
+ '''Method called at class initialization : Put all fields corresponding to the command context (user, time, ...)
+ '''
+ # command name
+ self.xmlFile.add_simple_node("Site", attrib={"command" : self.config.VARS.command})
+ # version of salomeTools
+ self.xmlFile.append_node_attrib("Site", attrib={"satversion" : self.config.INTERNAL.sat_version})
+ # machine name on which the command has been launched
+ self.xmlFile.append_node_attrib("Site", attrib={"hostname" : self.config.VARS.hostname})
+ # Distribution of the machine
+ self.xmlFile.append_node_attrib("Site", attrib={"OS" : self.config.VARS.dist})
+ # The user that have launched the command
+ self.xmlFile.append_node_attrib("Site", attrib={"user" : self.config.VARS.user})
+ # The time when command was launched
+ Y, m, dd, H, M, S = date_to_datetime(self.config.VARS.datehour)
+ date_hour = "%2s/%2s/%4s %2sh%2sm%2ss" % (dd, m, Y, H, M, S)
+ self.xmlFile.append_node_attrib("Site", attrib={"beginTime" : date_hour})
+ # The initialization of the trace node
+ self.xmlFile.add_simple_node("Log",text="")