Information
We are currently investigating an issue with the editor of some pages. Please save your work and avoid to create new pages until this banner is gone.
...
Python
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
#By Name comp = self.getComponent("<Name>") #By Interface. Must be at least one component configured as default! comp = self.getDefaultComponent("IDL:<prefix>/<Module>/<Interface>:1.0") #Release Components self.releaseComponent(comp.name()) |
Java
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
//Shared import alma.<Module>.<Interface>; import alma.<Module>.<Interface>Helper; //By Name <Interface> comp = <Interface>Helper.narrow(this.m_containerServices.getComponent("<Name>")); //By Interface. Must be at least one component configured as default! <Interface> comp = <Interface>Helper.narrow(this.m_containerServices.getDefaultComponent("IDL:<prefix>/<Module>/<Interface>:1.0")); //Release Components m_containerServies.releaseComponent(comp.name()); |
C++
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
//By Name <Module>::<Interface>_var comp = this->getContainerServices()->getComponent<<Module>::<Interface>>("<Name>"); //By Interface. Must be at least one component configured as default! <Module>::<Interface>_var comp = this->getContainerServices()->getDefaultComponent<<Module>::<Interface>>("IDL:<prefix>/<Module>/<Interface>:1.0"); //Release Components this->getContainerServices()->releaseComponent(comp->name()); |
ACS Logging has two main benefits:
Python
Code Block |
---|
logger = self.getLogger()
logger.logTrace("...")
logger.logDebug("...")
logger.logInfo("...")
logger.logWarning("...")
logger.logError("...")
#An example
logger.info("A real log with a string '%s' and an int (%d)" % ("Log Entry", 3)) |
Java
Code Block |
---|
m_logger.finer("...");
m_logger.fine("...");
m_logger.info("...");
m_logger.warning("...");
m_logger.severe("...");
#An example
m_logger.info("A real log with a string '" + "Log Entry" + "' and an int (" + String.valueOf(3) + ")"); |
C++
Code Block |
---|
ACS_TRACE("...");
ACS_DEBUG("...");
ACS_SHORT_LOG((LM_INFO, "..."));
ACS_SHORT_LOG((LM_WARNING, "..."));
ACS_SHORT_LOG((LM_ERROR, "..."));
//An example
ACS_SHORT_LOG((LM_INFO, "A real log with a string '%s' and an int (%d)", "Log Entry", 3)); |
Error Handling in ACS Components has 4 pieces: