Directs yangtools warnings into the logfile and updates yangstore
messages such that we know when the store reaches consistent state after
being inconsistent.
Change-Id: Ica26af53ba7e39329e32014c46564adc793bbdfb
Signed-off-by: Robert Varga <rovarga@cisco.com>
// inconsistent state
inconsistentBundlesToYangURLs.putAll(bundle, addedURLs);
// inconsistent state
inconsistentBundlesToYangURLs.putAll(bundle, addedURLs);
- logger.debug("Yang store is falling back on last consistent state containing {}, inconsistent yang files {}",
+ logger.debug("Yang store is falling back to last consistent state containing {}, inconsistent yang files {}",
consistentBundlesToYangURLs, inconsistentBundlesToYangURLs, failureReason);
consistentBundlesToYangURLs, inconsistentBundlesToYangURLs, failureReason);
- logger.warn("Yang store is falling back on last consistent state containing {} files, inconsistent yang files size is {}, reason {}",
+ logger.info("Yang store is falling back to last consistent state containing {} files, keeping {} inconsistent yang files due to {}",
consistentBundlesToYangURLs.size(), inconsistentBundlesToYangURLs.size(), failureReason.toString());
cache.setInconsistentURLsForReporting(inconsistentBundlesToYangURLs.values());
}
consistentBundlesToYangURLs.size(), inconsistentBundlesToYangURLs.size(), failureReason.toString());
cache.setInconsistentURLsForReporting(inconsistentBundlesToYangURLs.values());
}
// merge into
consistentBundlesToYangURLs.clear();
consistentBundlesToYangURLs.putAll(proposedNewState);
// merge into
consistentBundlesToYangURLs.clear();
consistentBundlesToYangURLs.putAll(proposedNewState);
- inconsistentBundlesToYangURLs.clear();
+
+ logger.debug("Yang store updated to new consistent state containing {}", consistentBundlesToYangURLs);
+
+ // If we cleared up some inconsistent models, report that
+ if (!inconsistentBundlesToYangURLs.isEmpty()) {
+ inconsistentBundlesToYangURLs.clear();
+ logger.info("Yang store updated to new consistent state containing {} yang files", consistentBundlesToYangURLs.size());
+ }
updateCache(snapshot);
cache.setInconsistentURLsForReporting(Collections.<URL> emptySet());
updateCache(snapshot);
cache.setInconsistentURLsForReporting(Collections.<URL> emptySet());
- logger.trace("Yang store updated to new consistent state containing {} yang files", consistentBundlesToYangURLs.size());
- logger.debug("Yang store updated to new consistent state containing {}", consistentBundlesToYangURLs);
}
private synchronized void updateCache(YangStoreSnapshotImpl snapshot) {
}
private synchronized void updateCache(YangStoreSnapshotImpl snapshot) {
<logger name="org.opendaylight.controller.usermanager" level="INFO"/>
<!-- Web modules -->
<logger name="org.opendaylight.controller.web" level="INFO"/>
<logger name="org.opendaylight.controller.usermanager" level="INFO"/>
<!-- Web modules -->
<logger name="org.opendaylight.controller.web" level="INFO"/>
+
+ <!--
+ Unsynchronized controller startup causes models to crop up in random
+ order, which results in temporary inability to fully resolve a model,
+ which is usually resolved. Do not flood console, but keep the messages,
+ as they may be indicating and error.
+ -->
+ <logger name="org.opendaylight.yangtools.yang.parser.util.ModuleDependencySort" level="INFO" additivity="false">
+ <appender-ref ref="opendaylight.log"/>
+ </logger>
+
<!-- additivity=false ensures analytics data only goes to the analytics log -->
<logger name="audit" level="INFO" additivity="false">
<appender-ref ref="audit-file"/>
<!-- additivity=false ensures analytics data only goes to the analytics log -->
<logger name="audit" level="INFO" additivity="false">
<appender-ref ref="audit-file"/>