[ecobee] only log stack traces to openhab.log if debug is enabled (#9443)
Signed-off-by: Rob Nielsen <rob.nielsen@yahoo.com>
This commit is contained in:
parent
22ac639233
commit
809ee6ffdb
|
@ -167,9 +167,18 @@ public class EcobeeApi implements AccessTokenRefreshListener {
|
||||||
accessTokenResponse = localAccessTokenResponse;
|
accessTokenResponse = localAccessTokenResponse;
|
||||||
ecobeeAuth.doAuthorization();
|
ecobeeAuth.doAuthorization();
|
||||||
} catch (OAuthException | IOException | RuntimeException e) {
|
} catch (OAuthException | IOException | RuntimeException e) {
|
||||||
|
if (logger.isDebugEnabled()) {
|
||||||
logger.info("API: Got exception trying to get access token from OAuth service", e);
|
logger.info("API: Got exception trying to get access token from OAuth service", e);
|
||||||
|
} else {
|
||||||
|
logger.info("API: Got {} trying to get access token from OAuth service: {}",
|
||||||
|
e.getClass().getSimpleName(), e.getMessage());
|
||||||
|
}
|
||||||
} catch (EcobeeAuthException e) {
|
} catch (EcobeeAuthException e) {
|
||||||
|
if (logger.isDebugEnabled()) {
|
||||||
logger.info("API: The Ecobee authorization process threw an exception", e);
|
logger.info("API: The Ecobee authorization process threw an exception", e);
|
||||||
|
} else {
|
||||||
|
logger.info("API: The Ecobee authorization process threw an exception: {}", e.getMessage());
|
||||||
|
}
|
||||||
ecobeeAuth.setState(EcobeeAuthState.NEED_PIN);
|
ecobeeAuth.setState(EcobeeAuthState.NEED_PIN);
|
||||||
} catch (OAuthResponseException e) {
|
} catch (OAuthResponseException e) {
|
||||||
handleOAuthException(e);
|
handleOAuthException(e);
|
||||||
|
|
Loading…
Reference in New Issue