com.applitools.eyes.Logger.log()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(7.8k)|赞(0)|评价(0)|浏览(190)

本文整理了Java中com.applitools.eyes.Logger.log()方法的一些代码示例,展示了Logger.log()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.log()方法的具体详情如下:
包路径:com.applitools.eyes.Logger
类名称:Logger
方法名:log

Logger.log介绍

[英]Writes a (non-verbose) write message.
[中]写入(非详细的)写入消息。

代码示例

代码示例来源:origin: com.applitools/eyes-selenium-java3

@Override
protected void setViewportSize(RectangleSize size) {
  logger.log("WARNING setViewportSize() was called in Visual-Grid context");
}

代码示例来源:origin: com.applitools/eyes-sdk-java

/**
 * @param hostApp The application running the AUT (e.g., Chrome).
 */
@SuppressWarnings("UnusedDeclaration")
public void setHostApp(String hostApp) {
  logger.log("Host App: " + hostApp);
  if (hostApp == null || hostApp.isEmpty()) {
    this.hostApp = null;
  } else {
    this.hostApp = hostApp.trim();
  }
}

代码示例来源:origin: com.applitools/eyes-sdk-java-jersey2x

/**
 * @param hostApp The application running the AUT (e.g., Chrome).
 */
@SuppressWarnings("UnusedDeclaration")
public void setHostApp(String hostApp) {
  logger.log("Host App: " + hostApp);
  if (hostApp == null || hostApp.isEmpty()) {
    this.hostApp = null;
  } else {
    this.hostApp = hostApp.trim();
  }
}

代码示例来源:origin: com.applitools/eyes-sdk-core-java3-jersey2x

/**
 * @param hostApp The application running the AUT (e.g., Chrome).
 */
@SuppressWarnings("UnusedDeclaration")
public void setHostApp(String hostApp) {
  logger.log("Host App: " + hostApp);
  if (hostApp == null || hostApp.isEmpty()) {
    this.hostApp = null;
  } else {
    this.hostApp = hostApp.trim();
  }
}

代码示例来源:origin: com.applitools/eyes-sdk-java

/**
 * @param hostOS The host OS running the AUT.
 */
@SuppressWarnings("UnusedDeclaration")
public void setHostOS(String hostOS) {
  logger.log("Host OS: " + hostOS);
  if(hostOS == null || hostOS.isEmpty()) {
    this.hostOS = null;
  }
  else {
    this.hostOS = hostOS.trim();
  }
}

代码示例来源:origin: com.applitools/eyes-sdk-java-jersey2x

/**
 * @param hostOS The host OS running the AUT.
 */
@SuppressWarnings("UnusedDeclaration")
public void setHostOS(String hostOS) {
  logger.log("Host OS: " + hostOS);
  if(hostOS == null || hostOS.isEmpty()) {
    this.hostOS = null;
  }
  else {
    this.hostOS = hostOS.trim();
  }
}

代码示例来源:origin: com.applitools/eyes-sdk-core-java3-jersey2x

/**
 * @param hostOS The host OS running the AUT.
 */
@SuppressWarnings("UnusedDeclaration")
public void setHostOS(String hostOS) {
  logger.log("Host OS: " + hostOS);
  if(hostOS == null || hostOS.isEmpty()) {
    this.hostOS = null;
  }
  else {
    this.hostOS = hostOS.trim();
  }
}

代码示例来源:origin: com.applitools/eyes-sdk-java

/**
 * @param baselineName If specified, determines the baseline to compare
 *                     with and disables automatic baseline inference.
 */
@SuppressWarnings("UnusedDeclaration")
public void setBaselineName(String baselineName) {
  logger.log("Baseline name: " + baselineName);
  if(baselineName == null || baselineName.isEmpty()) {
    this.baselineName = null;
  }
  else {
    this.baselineName = baselineName.trim();
  }
}

代码示例来源:origin: com.applitools/eyes-sdk-core-java3-jersey2x

/**
 * If not {@code null} specifies a name for the environment in which the application under test is running.
 *
 * @param envName The name of the environment of the baseline.
 */
@SuppressWarnings("UnusedDeclaration")
public void setEnvName(String envName) {
  logger.log("Environment name: " + envName);
  if(envName== null || envName.isEmpty()) {
    this.environmentName = null;
  }
  else {
    this.environmentName = envName.trim();
  }
}

代码示例来源:origin: com.applitools/eyes-sdk-core-java3-jersey2x

/**
 * If not {@code null}, determines the name of the environment of the baseline.
 *
 * @param baselineEnvName The name of the baseline's environment.
 */
@SuppressWarnings("UnusedDeclaration")
public void setBaselineEnvName(String baselineEnvName) {
  logger.log("Baseline environment name: " + baselineEnvName);
  if(baselineEnvName== null || baselineEnvName.isEmpty()) {
    this.baselineEnvName = null;
  }
  else {
    this.baselineEnvName = baselineEnvName.trim();
  }
}

代码示例来源:origin: com.applitools/eyes-sdk-java-jersey2x

/**
 * If not {@code null} specifies a name for the environment in which the application under test is running.
 *
 * @param envName The name of the environment of the baseline.
 */
@SuppressWarnings("UnusedDeclaration")
public void setEnvName(String envName) {
  logger.log("Environment name: " + envName);
  if(envName== null || envName.isEmpty()) {
    this.environmentName = null;
  }
  else {
    this.environmentName = envName.trim();
  }
}

代码示例来源:origin: com.applitools/eyes-sdk-java-jersey2x

/**
 * If not {@code null}, determines the name of the environment of the baseline.
 *
 * @param baselineEnvName The name of the baseline's environment.
 */
@SuppressWarnings("UnusedDeclaration")
public void setBaselineEnvName(String baselineEnvName) {
  logger.log("Baseline environment name: " + baselineEnvName);
  if(baselineEnvName== null || baselineEnvName.isEmpty()) {
    this.baselineEnvName = null;
  }
  else {
    this.baselineEnvName = baselineEnvName.trim();
  }
}

代码示例来源:origin: com.applitools/eyes-common-java3

public static void logExceptionStackTrace(Logger logger, Throwable ex) {
  ByteArrayOutputStream stream = new ByteArrayOutputStream(2048);
  PrintWriter writer = new PrintWriter(stream, true);
  ex.printStackTrace(writer);
  logger.log(ex.toString());
  try {
    logger.log(stream.toString("UTF-8"));
    writer.close();
    stream.close();
  } catch (Exception e) {
    e.printStackTrace();
  }
}

代码示例来源:origin: com.applitools/eyes-common-java4

public static void logExceptionStackTrace(Logger logger, Exception ex) {
  ByteArrayOutputStream stream = new ByteArrayOutputStream(2048);
  PrintWriter writer = new PrintWriter(stream, true);
  ex.printStackTrace(writer);
  logger.log(ex.toString());
  try {
    logger.log(stream.toString("UTF-8"));
    writer.close();
    stream.close();
  } catch (Exception e) {
    e.printStackTrace();
  }
}

代码示例来源:origin: com.applitools/eyes-common-java3

@Override
public void run() {
  while (isServiceOn) {
    pauseIfNeeded();
    runNextTask();
  }
  if (this.executor != null) {
    this.executor.shutdown();
  }
  logger.log("Service '" + this.getName() + "' is finished");
}

代码示例来源:origin: com.applitools/eyes-selenium-java3

@Override
protected String getAUTSessionId() {
  try {
    if (this.cachedAUTSessionId == null) {
      this.cachedAUTSessionId = driver.getRemoteWebDriver().getSessionId().toString();
    }
    return this.cachedAUTSessionId;
  } catch (Exception e) {
    logger.log("WARNING: Failed to get AUT session ID! (maybe driver is not available?). Error: "
        + e.getMessage());
    return "";
  }
}

代码示例来源:origin: com.applitools/eyes-selenium-java3

public void check(String name, ICheckSettings checkSettings) {
  if (getIsDisabled()) {
    logger.log(String.format("check('%s', %s): Ignored", name, checkSettings));
    return;
  }
  ArgumentGuard.notNull(checkSettings, "checkSettings");
  checkSettings = checkSettings.withName(name);
  this.check(checkSettings);
}

代码示例来源:origin: com.applitools/eyes-selenium-java3

private void trySwitchToFrames(WebDriver driver, EyesTargetLocator switchTo, FrameChain frames) {
  if (EyesSeleniumUtils.isMobileDevice(driver)) {
    return;
  }
  try {
    switchTo.frames(frames);
  } catch (WebDriverException e) {
    logger.log("WARNING: Failed to switch to original frame chain! " + e.getMessage());
  }
}

代码示例来源:origin: com.applitools/eyes-selenium-java3

private void initDriver(WebDriver driver) {
  if (driver instanceof RemoteWebDriver) {
    this.driver = new EyesWebDriver(logger, this, (RemoteWebDriver) driver);
  } else if (driver instanceof EyesWebDriver) {
    this.driver = (EyesWebDriver) driver;
  } else {
    String errMsg = "Driver is not a RemoteWebDriver (" +
        driver.getClass().getName() + ")";
    logger.log(errMsg);
    throw new EyesException(errMsg);
  }
  if (EyesSeleniumUtils.isMobileDevice(driver)) {
    regionVisibilityStrategyHandler.set(new NopRegionVisibilityStrategy(logger));
  }
}

代码示例来源:origin: com.applitools/eyes-sdk-java

/**
 * Sets the maximal time (in seconds) a match operation tries to perform
 * a match.
 *
 * @param seconds Total number of seconds to wait for a match.
 */
@SuppressWarnings("UnusedDeclaration")
public void setMatchTimeout(int seconds) {
  if (getIsDisabled()) {
    logger.verbose("Ignored");
    return;
  }
  logger.verbose("setMatchTimeout(" + seconds + ")");
  ArgumentGuard.greaterThanOrEqualToZero(seconds, "seconds");
  this.matchTimeout = seconds;
  logger.log("Match timeout set to " + seconds + " second(s)");
}

相关文章