Skip to content

Commit

Permalink
refactor(nm): org.eclipse.kura.nm log cleanup/update (#4535)
Browse files Browse the repository at this point in the history
* refactor(nm): add missing log entry on modem reset cancel

* refactor: lower overall log verbosity
  • Loading branch information
mattdibi authored Apr 7, 2023
1 parent c7dfb5e commit 9b64377
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -387,14 +387,10 @@ private void enableInterface(String deviceId, NetworkProperties properties, Devi
Map<String, Map<String, Variant<?>>> newConnectionSettings = NMSettingsConverter.buildSettings(properties,
connection, deviceId, interfaceName, deviceType);

logger.info("New settings parsed");

DeviceStateLock dsLock = new DeviceStateLock(this.dbusConnection, device.getObjectPath(),
NMDeviceState.NM_DEVICE_STATE_CONFIG);

if (connection.isPresent()) {
logger.info("Current settings available");

connection.get().Update(newConnectionSettings);
this.nm.ActivateConnection(new DBusPath(connection.get().getObjectPath()),
new DBusPath(device.getObjectPath()), new DBusPath("/"));
Expand Down Expand Up @@ -643,7 +639,7 @@ private Optional<Connection> getAssociatedConnection(Device dev) throws DBusExce
if (appliedConnection.isPresent()) {
return appliedConnection;
} else {
logger.info("Active connection not found, looking for avaliable connections.");
logger.debug("Active connection not found, looking for avaliable connections.");

List<Connection> availableConnections = getAvaliableConnections(dev);

Expand Down Expand Up @@ -860,4 +856,4 @@ private List<Properties> getBearersPropertiesFromPaths(List<DBusPath> bearerPath
}
return bearerProperties;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ private boolean timerAlreadyScheduled() {

public void clearTimer() {
if (timerAlreadyScheduled()) {
logger.info("Clearing timer for {}. Cancelling scheduled modem reset...", this.nmDevicePath);
this.scheduledTasks.cancel();
this.scheduledTasks = null;
}
Expand Down

0 comments on commit 9b64377

Please sign in to comment.