Improving code and logging

This commit is contained in:
Luca Frosini 2024-04-29 17:23:39 +02:00
parent 0c547f14e3
commit 6c67cccd63
2 changed files with 4 additions and 4 deletions

View File

@ -54,7 +54,7 @@ public abstract class BasicUsageRecord extends AbstractRecord implements UsageRe
this.setScope(context);
} catch (Throwable t) {
logger.warn(
"Unable to automaticcally set the scope using scope provider. The record will not be valid if the scope will not be explicitly set.");
"Unable to automatically set the context using the known providers. The record will not be valid if the scope will not be explicitly set.");
}
}

View File

@ -41,13 +41,13 @@ public class AccountingPersistenceConfiguration extends PersistenceBackendConfig
public AccountingPersistenceConfiguration(Class<?> clz) throws Exception {
super();
String context = ContextUtility.getCurrentContextFullName();
try {
ServiceEndpoint serviceEndpoint = getServiceEndpoint(SERVICE_ENDPOINT_CATEGORY, SERVICE_ENDPOINT_NAME, clz);
setValues(serviceEndpoint, clz);
}catch (Exception e) {
logger.error("Error while instancing {} in context {}", this.getClass().getSimpleName(), context
, e);
String context = ContextUtility.getCurrentContextFullName();
logger.error("Error while instancing {} in context {}",
this.getClass().getSimpleName(), context, e);
}
}