mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
only log stack traces to openhab.log if debug is enabled (#9427)
Signed-off-by: Rob Nielsen <rob.nielsen@yahoo.com>
This commit is contained in:
parent
6b888b3492
commit
4409cf63c9
@ -173,7 +173,11 @@ public class NetatmoBridgeHandler extends BaseBridgeHandler {
|
||||
"Unable to connect Netatmo API : " + e.getLocalizedMessage());
|
||||
}
|
||||
} catch (RuntimeException e) {
|
||||
logger.warn("Unable to connect Netatmo API : {}", e.getMessage(), e);
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.warn("Unable to connect Netatmo API : {}", e.getMessage(), e);
|
||||
} else {
|
||||
logger.warn("Unable to connect Netatmo API : {}", e.getMessage());
|
||||
}
|
||||
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR,
|
||||
"Netatmo Access Failed, will retry in " + configuration.reconnectInterval + " seconds.");
|
||||
}
|
||||
|
@ -199,7 +199,11 @@ public class CloudClient {
|
||||
}).on(Socket.EVENT_ERROR, new Emitter.Listener() {
|
||||
@Override
|
||||
public void call(Object... args) {
|
||||
logger.error("Error connecting to the openHAB Cloud instance: {}", args[0]);
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.error("Error connecting to the openHAB Cloud instance: {}", args[0]);
|
||||
} else {
|
||||
logger.error("Error connecting to the openHAB Cloud instance");
|
||||
}
|
||||
}
|
||||
}).on("request", new Emitter.Listener() {
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user