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

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

本文整理了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

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

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

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

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

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

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

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

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

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

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

  1. public SandboxClassLoader(
  2. ClassLoader systemClassLoader, InstrumentationConfiguration config, URL... urls) {
  3. super(getClassPathUrls(systemClassLoader), systemClassLoader.getParent());
  4. this.systemClassLoader = systemClassLoader;
  5. this.config = config;
  6. this.urls = new URLClassLoader(urls, null);
  7. for (URL url : urls) {
  8. Logger.debug("Loading classes from: %s", url);
  9. }
  10. ClassInstrumentor.Decorator decorator = new ShadowDecorator();
  11. classInstrumentor = createClassInstrumentor(decorator);
  12. classNodeProvider = new ClassNodeProvider() {
  13. @Override
  14. protected byte[] getClassBytes(String internalClassName) throws ClassNotFoundException {
  15. return getByteCode(internalClassName);
  16. }
  17. };
  18. }

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

  1. public TypedResource pick(ResName resName, ResTable_config toMatch) {
  2. List<TypedResource> values = map.get(resName);
  3. if (values == null || values.size() == 0) return null;
  4. TypedResource bestMatchSoFar = null;
  5. for (TypedResource candidate : values) {
  6. ResTable_config candidateConfig = candidate.getConfig();
  7. if (candidateConfig.match(toMatch)) {
  8. if (bestMatchSoFar == null || candidateConfig.isBetterThan(bestMatchSoFar.getConfig(), toMatch)) {
  9. bestMatchSoFar = candidate;
  10. }
  11. }
  12. }
  13. if (Logger.loggingEnabled()) {
  14. Logger.debug("Picked '%s' for %s for qualifiers '%s' (%d candidates)",
  15. bestMatchSoFar == null ? "<none>" : bestMatchSoFar.getXmlContext().getQualifiers().toString(),
  16. resName.getFullyQualifiedName(),
  17. toMatch,
  18. values.size());
  19. }
  20. return bestMatchSoFar;
  21. }

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

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

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

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

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

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

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

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

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

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

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

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

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

  1. public SandboxClassLoader(URLClassLoader systemClassLoader, InstrumentationConfiguration config, URL... urls) {
  2. super(systemClassLoader.getURLs(), systemClassLoader.getParent());
  3. this.systemClassLoader = systemClassLoader;
  4. this.config = config;
  5. this.urls = new URLClassLoader(urls, null);
  6. classesToRemap = convertToSlashes(config.classNameTranslations());
  7. methodsToIntercept = convertToSlashes(config.methodsToIntercept());
  8. for (URL url : urls) {
  9. Logger.debug("Loading classes from: %s", url);
  10. }
  11. }

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

  1. public TypedResource pick(ResName resName, ResTable_config toMatch) {
  2. List<TypedResource> values = map.get(resName);
  3. if (values == null || values.size() == 0) return null;
  4. TypedResource bestMatchSoFar = null;
  5. for (TypedResource candidate : values) {
  6. ResTable_config candidateConfig = candidate.getConfig();
  7. if (candidateConfig.match(toMatch)) {
  8. if (bestMatchSoFar == null || candidateConfig.isBetterThan(bestMatchSoFar.getConfig(), toMatch)) {
  9. bestMatchSoFar = candidate;
  10. }
  11. }
  12. }
  13. if (Logger.loggingEnabled()) {
  14. Logger.debug("Picked '%s' for %s for qualifiers '%s' (%d candidates)",
  15. bestMatchSoFar == null ? "<none>" : bestMatchSoFar.getXmlContext().getQualifiers().toString(),
  16. resName.getFullyQualifiedName(),
  17. toMatch,
  18. values.size());
  19. }
  20. return bestMatchSoFar;
  21. }

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

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

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

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

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

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

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

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

相关文章