Skip to content

Commit

Permalink
TEDEFO-3325 addressing feedback to change from debug to trace and imp…
Browse files Browse the repository at this point in the history
…roving the logs.
  • Loading branch information
rouschr committed May 2, 2024
1 parent 4b26731 commit 6eb4650
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public T createInstance(Object... initArgs) throws InstantiationException {
.collect(Collectors.toList())
.toArray(new Class[0]);

logger.debug("Creating an instance of [{}] using constructor with parameter types: {}",
logger.trace("Creating an instance of [{}] using constructor with parameter types: {}",
implType, paramTypes);

Constructor<T> constructor = Optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,10 @@ private void populateComponents() {
.map(Package::getName)
.toArray(String[]::new);

if (logger.isDebugEnabled()) {
if (logger.isTraceEnabled()) {
final List<String> packages = Arrays.asList(availablePackages);

logger.debug("eforms eu packages:");
packages.stream().sorted()
.filter(p -> p.contains("eu.") && !p.contains("digit"))
.forEach(p -> logger.debug(p));

logger.debug("viewer package");
packages.stream().sorted()
.filter(p -> p.contains("eu.europa.ted.eforms.viewer"))
.forEach(p -> logger.debug(p));
.forEach(p -> logger.trace(p));
}

new Reflections(ConfigurationBuilder.build().forPackages(availablePackages))
Expand Down Expand Up @@ -154,12 +146,12 @@ protected <T> T getComponentImpl(String sdkVersion, final SdkComponentType compo
.orElseGet(Collections::emptyMap);

if (logger.isDebugEnabled()) {
logger.debug("selector componentType={}", selector.componentType);
logger.debug("selector qualifier={}", selector.qualifier);
logger.debug("normalized version={}", normalizedVersion);
logger.debug("Looking for component with version=[{}], componentType=[{}], qualifier=[{}]",
normalizedVersion, selector.componentType, selector.qualifier);
for (Entry<ComponentSelector, SdkComponentDescriptor<?>> entry : map.entrySet()) {
logger.debug(
"entry key componentType={}, key qualifier={}, value={}",
"Available component for this version: "
+ "componentType=[{}], qualifier=[{}], value=[{}]",
entry.getKey().componentType,
entry.getKey().qualifier,
entry.getValue().getImplType().getName());
Expand All @@ -169,7 +161,6 @@ protected <T> T getComponentImpl(String sdkVersion, final SdkComponentType compo
@SuppressWarnings("unchecked")
SdkComponentDescriptor<T> descriptor =
(SdkComponentDescriptor<T>) map.get(selector);
logger.debug("descriptor descriptor={}", descriptor);

if (descriptor == null) {
logger.error("Failed to load required components of SDK [{}]", sdkVersion);
Expand Down

0 comments on commit 6eb4650

Please sign in to comment.