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

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

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

Logger.info介绍

[英]Log an info message.
[中]记录一条信息消息。

代码示例

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

public CachedMavenDependencyResolver() {
 // cacheDir bumped to 'robolectric-2' to invalidate caching of bad URLs on windows prior
 // to fix for https://github.com/robolectric/robolectric/issues/3955
 File cacheDir = new File(new File(System.getProperty("java.io.tmpdir")), "robolectric-2");
 DependencyResolver dependencyResolver = new MavenDependencyResolver();
 if (cacheDir.exists() || cacheDir.mkdir()) {
  Logger.info("Dependency cache location: %s", cacheDir.getAbsolutePath());
  this.delegate = new CachedDependencyResolver(dependencyResolver, cacheDir,
    60 * 60 * 24 * 1000);
 } else {
  this.delegate = dependencyResolver;
 }
}

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

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

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

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

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

Logger.info("Using Robolectric classes from %s", buildPathPropertiesUrl.getPath());

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

@Override
public ManifestIdentifier identify(Config config) {
 Path manifestFile = getFileFromProperty("android_merged_manifest");
 Path resourcesDir = getFileFromProperty("android_merged_resources");
 Path assetsDir = getFileFromProperty("android_merged_assets");
 Path apkFile = getFileFromProperty("android_resource_apk");
 String packageName = properties.getProperty("android_custom_package");
 String manifestConfig = config.manifest();
 if (Config.NONE.equals(manifestConfig)) {
  Logger.info("@Config(manifest = Config.NONE) specified while using Build System API, ignoring");
 } else if (!Config.DEFAULT_MANIFEST_NAME.equals(manifestConfig)) {
  manifestFile = getResource(manifestConfig);
 }
 if (!Config.DEFAULT_RES_FOLDER.equals(config.resourceDir())) {
  resourcesDir = getResource(config.resourceDir());
 }
 if (!Config.DEFAULT_ASSET_FOLDER.equals(config.assetDir())) {
  assetsDir = getResource(config.assetDir());
 }
 if (!Config.DEFAULT_PACKAGE_NAME.equals(config.packageName())) {
  packageName = config.packageName();
 }
 List<ManifestIdentifier> libraryDirs = emptyList();
 if (config.libraries().length > 0) {
  Logger.info("@Config(libraries) specified while using Build System API, ignoring");
 }
 return new ManifestIdentifier(packageName, manifestFile, resourcesDir, assetsDir, libraryDirs,
   apkFile);
}

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

@HiddenApi @Implementation(minSdk = LOLLIPOP)
public boolean getThemeValue(long themePtr, int ident, TypedValue outValue, boolean resolveRefs) {
 ResName resName = resourceTable.getResName(ident);
 ThemeStyleSet themeStyleSet = getNativeTheme(themePtr).themeStyleSet;
 AttributeResource attrValue = themeStyleSet.getAttrValue(resName);
 while(attrValue != null && attrValue.isStyleReference()) {
  ResName attrResName = attrValue.getStyleReference();
  if (attrValue.resName.equals(attrResName)) {
   Logger.info("huh... circular reference for %s?", attrResName.getFullyQualifiedName());
   return false;
  }
  attrValue = themeStyleSet.getAttrValue(attrResName);
 }
 if (attrValue != null) {
  convertAndFill(attrValue, outValue, config, resolveRefs);
  return true;
 }
 return false;
}

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

ResName otherAttrName = attribute.getStyleReference();
if (attribute.resName.equals(otherAttrName)) {
 Logger.info("huh... circular reference for %s?", attribute.resName.getFullyQualifiedName());
 return null;

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

DependencyResolver dependencyResolver = (DependencyResolver) ReflectionHelpers.callConstructor(mavenDependencyResolverClass);
if (cacheDir.exists() || cacheDir.mkdir()) {
 Logger.info("Dependency cache location: %s", cacheDir.getAbsolutePath());
 this.dependencyResolver = new CachedDependencyResolver(dependencyResolver, cacheDir, 60 * 60 * 24 * 1000);
} else {
Logger.info("Using Robolectric classes from %s", buildPathPropertiesUrl.getPath());

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

@Override
public ManifestIdentifier identify(Config config) {
 FsFile manifestFile = getFsFileFromProperty("android_merged_manifest");
 FsFile resourcesDir = getFsFileFromProperty("android_merged_resources");
 FsFile assetsDir = getFsFileFromProperty("android_merged_assets");
 FsFile apkFile = getFsFileFromProperty("android_resource_apk");
 String packageName = properties.getProperty("android_custom_package");
 String manifestConfig = config.manifest();
 if (Config.NONE.equals(manifestConfig)) {
  Logger.info("@Config(manifest = Config.NONE) specified while using Build System API, ignoring");
 } else if (!Config.DEFAULT_MANIFEST_NAME.equals(manifestConfig)) {
  manifestFile = resolveFile(manifestConfig);
 }
 if (!Config.DEFAULT_RES_FOLDER.equals(config.resourceDir())) {
  resourcesDir = resolveFile(config.resourceDir());
 }
 if (!Config.DEFAULT_ASSET_FOLDER.equals(config.assetDir())) {
  assetsDir = resolveFile(config.assetDir());
 }
 if (!Config.DEFAULT_PACKAGE_NAME.equals(config.packageName())) {
  packageName = config.packageName();
 }
 List<ManifestIdentifier> libraryDirs = emptyList();
 if (config.libraries().length > 0) {
  Logger.info("@Config(libraries) specified while using Build System API, ignoring");
 }
 return new ManifestIdentifier(packageName, manifestFile, resourcesDir, assetsDir, libraryDirs,
   apkFile);
}

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

protected DependencyResolver getJarResolver() {
  if (dependencyResolver == null) {
    if (Boolean.getBoolean("robolectric.offline")) {
      String dependencyDir = System.getProperty("robolectric.dependency.dir", ".");
      dependencyResolver = new LocalDependencyResolver(new File(dependencyDir));
    } else {
      File cacheDir = new File(new File(System.getProperty("java.io.tmpdir")), "robolectric");
      cacheDir.mkdir();
      if (cacheDir.exists()) {
        Logger.info("Dependency cache location: %s", cacheDir.getAbsolutePath());
        dependencyResolver = new CachedDependencyResolver(new MavenDependencyResolver(), cacheDir, 60 * 60 * 24 * 1000);
      } else {
        dependencyResolver = new MavenDependencyResolver();
      }
    }
  }
  return dependencyResolver;
}

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

protected DependencyResolver getJarResolver() {
  if (dependencyResolver == null) {
    if (Boolean.getBoolean("robolectric.offline")) {
      String dependencyDir = System.getProperty("robolectric.dependency.dir", ".");
      dependencyResolver = new LocalDependencyResolver(new File(dependencyDir));
    } else {
      File cacheDir = new File(new File(System.getProperty("java.io.tmpdir")), "robolectric");
      cacheDir.mkdir();
      if (cacheDir.exists()) {
        Logger.info("Dependency cache location: %s", cacheDir.getAbsolutePath());
        dependencyResolver = new CachedDependencyResolver(new MavenDependencyResolver(), cacheDir, 60 * 60 * 24 * 1000);
      } else {
        dependencyResolver = new MavenDependencyResolver();
      }
    }
  }
  return dependencyResolver;
}

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

@HiddenApi @Implementation(minSdk = LOLLIPOP)
public boolean getThemeValue(long themePtr, int ident, TypedValue outValue, boolean resolveRefs) {
 ResName resName = resourceTable.getResName(ident);
 ThemeStyleSet themeStyleSet = getNativeTheme(themePtr).themeStyleSet;
 AttributeResource attrValue = themeStyleSet.getAttrValue(resName);
 while(attrValue != null && attrValue.isStyleReference()) {
  ResName attrResName = attrValue.getStyleReference();
  if (attrValue.resName.equals(attrResName)) {
   Logger.info("huh... circular reference for %s?", attrResName.getFullyQualifiedName());
   return false;
  }
  attrValue = themeStyleSet.getAttrValue(attrResName);
 }
 if (attrValue != null) {
  convertAndFill(attrValue, outValue, config, resolveRefs);
  return true;
 }
 return false;
}

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

@HiddenApi @Implementation(minSdk = LOLLIPOP)
public boolean getThemeValue(long themePtr, int ident, TypedValue outValue, boolean resolveRefs) {
 ResName resName = resourceTable.getResName(ident);
 ThemeStyleSet themeStyleSet = getNativeTheme(themePtr).themeStyleSet;
 AttributeResource attrValue = themeStyleSet.getAttrValue(resName);
 while(attrValue != null && attrValue.isStyleReference()) {
  ResName attrResName = attrValue.getStyleReference();
  if (attrValue.resName.equals(attrResName)) {
    Logger.info("huh... circular reference for %s?", attrResName.getFullyQualifiedName());
    return false;
  }
  attrValue = themeStyleSet.getAttrValue(attrResName);
 }
 if (attrValue != null) {
  convertAndFill(attrValue, outValue, RuntimeEnvironment.getQualifiers(), resolveRefs);
  return true;
 }
 return false;
}

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

@HiddenApi @Implementation(minSdk = LOLLIPOP)
public boolean getThemeValue(long themePtr, int ident, TypedValue outValue, boolean resolveRefs) {
 ResName resName = resourceTable.getResName(ident);
 ThemeStyleSet themeStyleSet = getNativeTheme(themePtr).themeStyleSet;
 AttributeResource attrValue = themeStyleSet.getAttrValue(resName);
 while(attrValue != null && attrValue.isStyleReference()) {
  ResName attrResName = attrValue.getStyleReference();
  if (attrValue.resName.equals(attrResName)) {
    Logger.info("huh... circular reference for %s?", attrResName.getFullyQualifiedName());
    return false;
  }
  attrValue = themeStyleSet.getAttrValue(attrResName);
 }
 if (attrValue != null) {
  convertAndFill(attrValue, outValue, RuntimeEnvironment.getQualifiers(), resolveRefs);
  return true;
 }
 return false;
}

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

ResName otherAttrName = attribute.getStyleReference();
if (attribute.resName.equals(otherAttrName)) {
 Logger.info("huh... circular reference for %s?", attribute.resName.getFullyQualifiedName());
 return null;

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

ResName otherAttrName = attribute.getStyleReference();
if (attribute.resName.equals(otherAttrName)) {
 Logger.info("huh... circular reference for %s?", attribute.resName.getFullyQualifiedName());
 return null;

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

ResName otherAttrName = attribute.getStyleReference();
if (attribute.resName.equals(otherAttrName)) {
 Logger.info("huh... circular reference for %s?", attribute.resName.getFullyQualifiedName());
 return null;

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

ResName otherAttrName = attribute.getStyleReference();
if (attribute.resName.equals(otherAttrName)) {
 Logger.info("huh... circular reference for %s?", attribute.resName.getFullyQualifiedName());
 return null;

相关文章