org.robolectric.util.Logger.debug()方法的使用及代码示例

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

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

Logger.debug介绍

[英]Log a debug message.
[中]记录调试消息。

代码示例

代码示例来源:origin: robolectric/robolectric

private void log(final String message) {
 org.robolectric.util.Logger.debug(message);
}

代码示例来源:origin: ACRA/acra

@Override
public int v(String tag, String msg, Throwable tr) {
  Logger.debug(msg.replace("%","%%"), tr);
  return 0;
}

代码示例来源:origin: ACRA/acra

@Override
public int d(String tag, String msg) {
  Logger.debug(msg.replace("%","%%"));
  return 0;
}

代码示例来源:origin: ACRA/acra

@Override
public int d(String tag, String msg, Throwable tr) {
  Logger.debug(msg.replace("%","%%"), tr);
  return 0;
}

代码示例来源:origin: ACRA/acra

@Override
public int v(String tag, String msg) {
  Logger.debug(msg.replace("%","%%"));
  return 0;
}

代码示例来源:origin: robolectric/robolectric

public SandboxClassLoader(
  ClassLoader systemClassLoader, InstrumentationConfiguration config, URL... urls) {
 super(getClassPathUrls(systemClassLoader), systemClassLoader.getParent());
 this.systemClassLoader = systemClassLoader;
 this.config = config;
 this.urls = new URLClassLoader(urls, null);
 for (URL url : urls) {
  Logger.debug("Loading classes from: %s", url);
 }
 ClassInstrumentor.Decorator decorator = new ShadowDecorator();
 classInstrumentor = createClassInstrumentor(decorator);
 classNodeProvider = new ClassNodeProvider() {
  @Override
  protected byte[] getClassBytes(String internalClassName) throws ClassNotFoundException {
   return getByteCode(internalClassName);
  }
 };
}

代码示例来源:origin: robolectric/robolectric

public TypedResource pick(ResName resName, ResTable_config toMatch) {
 List<TypedResource> values = map.get(resName);
 if (values == null || values.size() == 0) return null;
 TypedResource bestMatchSoFar = null;
 for (TypedResource candidate : values) {
  ResTable_config candidateConfig = candidate.getConfig();
  if (candidateConfig.match(toMatch)) {
   if (bestMatchSoFar == null || candidateConfig.isBetterThan(bestMatchSoFar.getConfig(), toMatch)) {
    bestMatchSoFar = candidate;
   }
  }
 }
 if (Logger.loggingEnabled()) {
  Logger.debug("Picked '%s' for %s for qualifiers '%s' (%d candidates)",
    bestMatchSoFar == null ? "<none>" : bestMatchSoFar.getXmlContext().getQualifiers().toString(),
    resName.getFullyQualifiedName(),
    toMatch,
    values.size());
 }
 return bestMatchSoFar;
}

代码示例来源:origin: robolectric/robolectric

private void parseResourceFiles(ResourcePath resourcePath, PackageResourceTable resourceTable) {
 if (!resourcePath.hasResources()) {
  Logger.debug("No resources for %s", resourceTable.getPackageName());
  return;
 Logger.debug("Loading resources for %s from %s...", resourceTable.getPackageName(), resourcePath.getResourceBase());

代码示例来源:origin: org.robolectric/shadows-core-v23

private void log(final String message) {
 org.robolectric.util.Logger.debug(message);
}

代码示例来源:origin: org.robolectric/framework

private void log(final String message) {
 org.robolectric.util.Logger.debug(message);
}

代码示例来源:origin: org.robolectric/shadows-core

private void log(final String message) {
 org.robolectric.util.Logger.debug(message);
}

代码示例来源:origin: org.robolectric/shadows-framework

private void log(final String message) {
 org.robolectric.util.Logger.debug(message);
}

代码示例来源:origin: robospock/RoboSpock

protected AndroidManifest createAppManifest(FsFile manifestFile, FsFile resDir, FsFile assetDir, String packageName) {
  if (!manifestFile.exists()) {
    System.out.print("WARNING: No manifest file found at " + manifestFile.getPath() + ".");
    System.out.println("Falling back to the Android OS resources only.");
    System.out.println("To remove this warning, annotate your test class with @Config(manifest=Config.NONE).");
    return null;
  }
  Logger.debug("Robolectric assets directory: " + assetDir.getPath());
  Logger.debug("   Robolectric res directory: " + resDir.getPath());
  Logger.debug("   Robolectric manifest path: " + manifestFile.getPath());
  Logger.debug("    Robolectric package name: " + packageName);
  return new AndroidManifest(manifestFile, resDir, assetDir, packageName);
}

代码示例来源:origin: org.robolectric/robolectric-sandbox

public SandboxClassLoader(URLClassLoader systemClassLoader, InstrumentationConfiguration config, URL... urls) {
 super(systemClassLoader.getURLs(), systemClassLoader.getParent());
 this.systemClassLoader = systemClassLoader;
 this.config = config;
 this.urls = new URLClassLoader(urls, null);
 classesToRemap = convertToSlashes(config.classNameTranslations());
 methodsToIntercept = convertToSlashes(config.methodsToIntercept());
 for (URL url : urls) {
  Logger.debug("Loading classes from: %s", url);
 }
}

代码示例来源:origin: org.robolectric/resources

public TypedResource pick(ResName resName, ResTable_config toMatch) {
 List<TypedResource> values = map.get(resName);
 if (values == null || values.size() == 0) return null;
 TypedResource bestMatchSoFar = null;
 for (TypedResource candidate : values) {
  ResTable_config candidateConfig = candidate.getConfig();
  if (candidateConfig.match(toMatch)) {
   if (bestMatchSoFar == null || candidateConfig.isBetterThan(bestMatchSoFar.getConfig(), toMatch)) {
    bestMatchSoFar = candidate;
   }
  }
 }
 if (Logger.loggingEnabled()) {
  Logger.debug("Picked '%s' for %s for qualifiers '%s' (%d candidates)",
    bestMatchSoFar == null ? "<none>" : bestMatchSoFar.getXmlContext().getQualifiers().toString(),
    resName.getFullyQualifiedName(),
    toMatch,
    values.size());
 }
 return bestMatchSoFar;
}

代码示例来源:origin: robospock/RoboSpock

Logger.debug("Robolectric assets directory: " + assets.getPath());
Logger.debug("   Robolectric res directory: " + res.getPath());
Logger.debug("   Robolectric manifest path: " + manifest.getPath());
Logger.debug("    Robolectric package name: " + packageName);
return new AndroidManifest(manifest, res, assets, packageName);

代码示例来源:origin: algolia/algoliasearch-client-android

@Override
protected AndroidManifest getAppManifest(Config config) {
  final String cwd = System.getProperty("user.dir");
  Logger.debug("Current working directory: " + cwd);
  Logger.debug("Robolectric assets directory: " + assets.getPath());
  Logger.debug("   Robolectric res directory: " + res.getPath());
  Logger.debug("   Robolectric manifest path: " + manifest.getPath());
  Logger.debug("    Robolectric package name: " + packageName);
  return new AndroidManifest(manifest, res, assets, packageName);

代码示例来源:origin: org.robolectric/robolectric-resources

private void parseResourceFiles(ResourcePath resourcePath, PackageResourceTable resourceTable) {
 if (!resourcePath.hasResources()) {
  Logger.debug("No resources for %s", resourceTable.getPackageName());
  return;
 Logger.debug("Loading resources for %s from %s...", resourceTable.getPackageName(), resourcePath.getResourceBase());

代码示例来源:origin: org.robolectric/resources

private void parseResourceFiles(ResourcePath resourcePath, PackageResourceTable resourceTable) {
 if (!resourcePath.hasResources()) {
  Logger.debug("No resources for %s", resourceTable.getPackageName());
  return;
 Logger.debug("Loading resources for %s from %s...", resourceTable.getPackageName(), resourcePath.getResourceBase());

相关文章

微信公众号

最新文章

更多