Skip to content
Snippets Groups Projects
Commit 1a477a3e authored by Guillaume PICHON's avatar Guillaume PICHON
Browse files

Logging improvement

parent 16e785d3
Branches
No related tags found
No related merge requests found
......@@ -137,7 +137,7 @@ public abstract class AOpcUaSubscriber implements IAttributeValueConsumer {
attribute.setReadValue(attrValue);
for (EventType event : attribute.getActivatedEvents()) {
getDeviceManager().pushEvent(attribute.getConfiguration().getName(), attrValue, event);
getLogger().debug("Attribute value event sent {}.", attrNode.toString());
getLogger().debug("Attribute value event {} sent {}.", event.getString(), attrNode.toString());
}
} catch (DevFailed e) {
getLogger().error("Attribute value error {}. value={} ", attrNode.toString(), value);
......
......@@ -100,7 +100,8 @@ public class OpcUaSubscriber extends AOpcUaSubscriber {
@StateMachine(endState = DeviceState.ON)
public void init() throws DevFailed {
setStatus("Init in progress.\nWaiting for connector to start and initialize...");
dynamicManager.addAttribute(new LogAttribute(1000, logger, LoggerFactory.getLogger(OpcUaAttribute.class)));
dynamicManager.addAttribute(new LogAttribute(1000, logger, LoggerFactory.getLogger(OpcUaAttribute.class),
LoggerFactory.getLogger(OpcUaAttributeParser.class)));
OpcUaProxy.registerSubscriber(this);
......@@ -263,7 +264,7 @@ public class OpcUaSubscriber extends AOpcUaSubscriber {
if (subscriptionResult != null && subscriptionResult.getAttributes()!=null) {
subscriptionResults.add(subscriptionResult);
} else {
logger.error("Subscription " + subName + " failed");
logger.error("Subscription " + subName + " failed. Device '"+ getDeviceManager().getName() + "'");
}
}
createTangoAttributes(subscriptionResults);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment