Skip to content

Commit

Permalink
moving traces info -> trace level
Browse files Browse the repository at this point in the history
  • Loading branch information
katkav committed Jun 5, 2020
1 parent 13bdd39 commit ff4afe2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
Expand Up @@ -6,6 +6,7 @@
*/
package com.evolveum.midpoint.gui.impl.factory.wrapper;

import com.evolveum.midpoint.gui.api.prism.wrapper.ShadowWrapper;
import com.evolveum.midpoint.util.logging.Trace;

import com.evolveum.midpoint.util.logging.TraceManager;
Expand All @@ -31,8 +32,10 @@ public class ShadowWrapperFactoryImpl extends PrismObjectWrapperFactoryImpl<Shad

@Override
public PrismObjectWrapper<ShadowType> createObjectWrapper(PrismObject<ShadowType> object, ItemStatus status) {
LOGGER.info("create shadow wrapper");
return new ShadowWrapperImpl(object, status);
LOGGER.trace("create shadow wrapper");
ShadowWrapper shadowWrapper = new ShadowWrapperImpl(object, status);
LOGGER.trace("Shadow wrapper created: {}", shadowWrapper);
return shadowWrapper;
}

@Override
Expand Down
Expand Up @@ -66,7 +66,7 @@ private void initLayout() {
attributesSettingsBuilder.build());
add(attributesPanel);
long attributesEnd = System.currentTimeMillis();
LOGGER.info("Attributes finished in {} ms", attributesEnd - attributesStart);
LOGGER.trace("Attributes finished in {} ms", attributesEnd - attributesStart);

long associationStart = System.currentTimeMillis();
ItemPanelSettingsBuilder associationBuilder = new ItemPanelSettingsBuilder()
Expand All @@ -76,7 +76,7 @@ private void initLayout() {
associationsPanel.add(new VisibleBehaviour(() -> checkAssociationsVisibility()));
add(associationsPanel);
long associationEnd = System.currentTimeMillis();
LOGGER.info("Association finished in {} ms", associationEnd - associationStart);
LOGGER.trace("Association finished in {} ms", associationEnd - associationStart);

long activationStart = System.currentTimeMillis();
ItemPanelSettingsBuilder activationBuilder = new ItemPanelSettingsBuilder()
Expand All @@ -86,7 +86,7 @@ private void initLayout() {
activationPanel.add(new VisibleBehaviour(() -> isActivationSupported()));
add(activationPanel);
long activationEnd = System.currentTimeMillis();
LOGGER.info("Activation finished in {} ms", activationEnd - activationStart);
LOGGER.trace("Activation finished in {} ms", activationEnd - activationStart);

long passwordStart = System.currentTimeMillis();
ItemPanelSettingsBuilder passwordSettingsBuilder = new ItemPanelSettingsBuilder()
Expand All @@ -96,10 +96,10 @@ private void initLayout() {
passwordPanel.add(new VisibleBehaviour(() -> isCredentialsSupported()));
add(passwordPanel);
long passwordEnd = System.currentTimeMillis();
LOGGER.info("Password finished in {} ms", passwordEnd - passwordStart);
LOGGER.trace("Password finished in {} ms", passwordEnd - passwordStart);
} catch (SchemaException e) {
getSession().error("Cannot create panels for shadow, reason: " + e.getMessage());
LOGGER.error("Cannot create panels for shadow, reason: {}", e.getMessage(), e);
LOGGER.trace("Cannot create panels for shadow, reason: {}", e.getMessage(), e);

}
}
Expand Down
Expand Up @@ -136,7 +136,7 @@ public void continueEditing(AjaxRequestTarget target) {
}

private List<ShadowWrapper> loadShadowWrappers(boolean noFetch) {
LOGGER.info("Loading shadow wrapper");
LOGGER.trace("Loading shadow wrapper");
long start = System.currentTimeMillis();
List<ShadowWrapper> list = new ArrayList<>();

Expand All @@ -160,7 +160,7 @@ private List<ShadowWrapper> loadShadowWrappers(boolean noFetch) {
noFetch, task, subResult, createLoadOptionForShadowWrapper());

long shadowTimestampAfter = System.currentTimeMillis();
LOGGER.info("Got shadow: {} in {}", projection, shadowTimestampAfter - shadowTimestampBefore);
LOGGER.trace("Got shadow: {} in {}", projection, shadowTimestampAfter - shadowTimestampBefore);
if(projection == null) {
// showResult(subResult, "pageAdminFocus.message.couldntLoadShadowProjection");
LOGGER.error("Couldn't load shadow projection");
Expand All @@ -186,10 +186,10 @@ private List<ShadowWrapper> loadShadowWrappers(boolean noFetch) {
LoggingUtils.logUnexpectedException(LOGGER, "Couldn't create shadow wrapper", e);
}
long timestampWrapperEnd = System.currentTimeMillis();
LOGGER.info("Load wrapper in {}", timestampWrapperEnd - timestampWrapperStart);
LOGGER.trace("Load wrapper in {}", timestampWrapperEnd - timestampWrapperStart);
}
long end = System.currentTimeMillis();
LOGGER.info("Load projctions in {}", end - start);
LOGGER.trace("Load projctions in {}", end - start);
return list;
}

Expand All @@ -209,7 +209,7 @@ public ShadowWrapper loadShadowWrapper(PrismObject<ShadowType> projection, Task
}

public void loadFullShadow(PrismObjectValueWrapper<ShadowType> shadowWrapperValue, AjaxRequestTarget target) {
LOGGER.info("Loading full shadow");
LOGGER.trace("Loading full shadow");
long start = System.currentTimeMillis();
if(shadowWrapperValue.getRealValue() == null) {
error(getString("pageAdminFocus.message.couldntCreateShadowWrapper"));
Expand All @@ -224,7 +224,7 @@ public void loadFullShadow(PrismObjectValueWrapper<ShadowType> shadowWrapperValu
result, createLoadOptionForShadowWrapper());

long loadEnd = System.currentTimeMillis();
LOGGER.info("Load projection in {} ms", loadEnd - loadStart);
LOGGER.trace("Load projection in {} ms", loadEnd - loadStart);
if (projection == null) {
result.recordFatalError(getString("PageAdminFocus.message.loadFullShadow.fatalError", shadowWrapperValue.getRealValue()));
showResult(result);
Expand All @@ -251,9 +251,9 @@ public void loadFullShadow(PrismObjectValueWrapper<ShadowType> shadowWrapperValu
LOGGER.error("Couldn't create shadow wrapper", e);
}
long wrapperEnd = System.currentTimeMillis();
LOGGER.info("Wrapper loaded in {} ms", wrapperEnd - wrapperStart);
LOGGER.trace("Wrapper loaded in {} ms", wrapperEnd - wrapperStart);
long end = System.currentTimeMillis();
LOGGER.info("Got full shadow in {} ms", end - start);
LOGGER.trace("Got full shadow in {} ms", end - start);
}

// @Override
Expand Down

0 comments on commit ff4afe2

Please sign in to comment.