diff --git a/bubble-server/src/main/java/bubble/service/cloud/StandardDeviceIdService.java b/bubble-server/src/main/java/bubble/service/cloud/StandardDeviceIdService.java
index 702d4dd7..f74c7084 100644
--- a/bubble-server/src/main/java/bubble/service/cloud/StandardDeviceIdService.java
+++ b/bubble-server/src/main/java/bubble/service/cloud/StandardDeviceIdService.java
@@ -126,14 +126,17 @@ public class StandardDeviceIdService implements DeviceIdService {
@Override public void setDeviceSecurityLevel(Device device) {
if (configuration.testMode()) return;
for (String ip : findIpsByDevice(device.getUuid())) {
- redis.set_plaintext(REDIS_KEY_DEVICE_SECURITY_LEVEL_PREFIX+ip, device.getSecurityLevel().name());
+ if (log.isDebugEnabled()) log.debug("setDeviceSecurityLevel("+device.getName()+") setting "+REDIS_KEY_DEVICE_SECURITY_LEVEL_PREFIX+ip+" = "+device.getSecurityLevel().name());
+ redis.set_plaintext(REDIS_KEY_DEVICE_SECURITY_LEVEL_PREFIX + ip, device.getSecurityLevel().name());
for (AppSite site : siteDAO.findByAccount(device.getAccount())) {
+ final String siteKey = REDIS_KEY_DEVICE_SITE_MAX_SECURITY_LEVEL_PREFIX + ip;
if (site.hasMaxSecurityHosts()) {
- final String siteKey = REDIS_KEY_DEVICE_SITE_MAX_SECURITY_LEVEL_PREFIX + ip;
if (site.enableMaxSecurityHosts()) {
+ if (log.isDebugEnabled()) log.debug("setDeviceSecurityLevel("+device.getName()+") adding to "+REDIS_KEY_DEVICE_SITE_MAX_SECURITY_LEVEL_PREFIX+ip+": "+ site.getMaxSecurityHostsJson());
redis.sadd_plaintext(siteKey, site.getMaxSecurityHosts());
} else {
+ if (log.isDebugEnabled()) log.debug("setDeviceSecurityLevel("+device.getName()+") removing from "+REDIS_KEY_DEVICE_SITE_MAX_SECURITY_LEVEL_PREFIX+ip+": "+ site.getMaxSecurityHostsJson());
redis.srem(siteKey, site.getMaxSecurityHosts());
}
}
diff --git a/bubble-server/src/main/resources/logback.xml b/bubble-server/src/main/resources/logback.xml
index 4285f4fe..95187ddd 100644
--- a/bubble-server/src/main/resources/logback.xml
+++ b/bubble-server/src/main/resources/logback.xml
@@ -62,6 +62,7 @@
+