Project

General

Profile

« Previous | Next » 

Revision 19920347

Added by Andreas Müller almost 2 years ago

ref #10072 dome adaptations for setLevel in dataportal

View differences:

src/main/java/eu/etaxonomy/dataportal/pages/TaxonProfilePage.java
17 17
import java.util.List;
18 18
import java.util.UUID;
19 19

  
20
import org.apache.logging.log4j.Level;
21 20
import org.apache.logging.log4j.LogManager;
22 21
import org.apache.logging.log4j.Logger;
23 22
import org.junit.Assert;
......
147 146
     */
148 147
    public FeatureBlock getFeatureBlockAt(int position, String featureName, String enclosingTag, String elementTag){
149 148

  
150
        LogUtils.setLevel(logger, Level.TRACE);
151
        logger.trace("getFeatureBlockAt()");
149
        LogUtils.logAsTrace(logger, "getFeatureBlockAt()");
152 150
        List<WebElement> featureBlocks = getDataPortalContent().getElement().findElements(By.className("block-cdm-dataportal-feature"));
153 151
        Assert.assertTrue("Too few feature block elements", featureBlocks.size() >= position);
154 152
        for(WebElement b : featureBlocks){
155
            if(logger.isTraceEnabled()) {
156
                logger.trace("getFeatureBlockAt() - checking block '" + b.getAttribute("id") + "");
157
            }
153
//            if(logger.isTraceEnabled()) {
154
                LogUtils.logAsTrace(logger, "getFeatureBlockAt() - checking block '" + b.getAttribute("id") + "");
155
//            }
158 156
            if (b.getAttribute("id").equals("block-cdm-dataportal-feature-" + normalizeClassAttribute(featureName))){
159
                logger.debug("getFeatureBlockAt() - block found, will be instantiated ...");
157
                LogUtils.logAsTrace(logger, "getFeatureBlockAt() - block found, will be instantiated ...");
160 158
                return new FeatureBlock( driver, b, enclosingTag, elementTag);
161 159
            }
162 160
        }

Also available in: Unified diff