public interface

LoggingUtils

 androidx.wear.protolayout.renderer.common.LoggingUtils

Subclasses:

LoggingUtilsImpl

Gradle dependencies

compile group: 'androidx.wear.protolayout', name: 'protolayout-renderer', version: '1.2.0'

  • groupId: androidx.wear.protolayout
  • artifactId: protolayout-renderer
  • version: 1.2.0

Artifact androidx.wear.protolayout:protolayout-renderer:1.2.0 it located at Google repository (https://maven.google.com/)

Overview

Logger used for extensive logging. Note that all logs will contain the component name. To enable logs use the following command:

   adb shell setprop log.tag.class_tag DEBUG
 

Summary

Methods
public booleancanLogD(java.lang.String tag)

Check whether debug logging is allowed or not for the given tag.

public voidlogD(java.lang.String tag, java.lang.String message)

LogD a formatted message.

public voidlogD(java.lang.String tag, java.lang.String format, java.lang.Object args[])

LogD a formatted message.

Methods

public void logD(java.lang.String tag, java.lang.String message)

LogD a formatted message.

public void logD(java.lang.String tag, java.lang.String format, java.lang.Object args[])

LogD a formatted message.

public boolean canLogD(java.lang.String tag)

Check whether debug logging is allowed or not for the given tag. This will allow clients to skip building logs if it's not necessary.

Source

package androidx.wear.protolayout.renderer.common;

import androidx.annotation.NonNull;
import androidx.annotation.RestrictTo;
import androidx.annotation.RestrictTo.Scope;

import com.google.errorprone.annotations.FormatMethod;
import com.google.errorprone.annotations.FormatString;

/**
 * Logger used for extensive logging. Note that all logs will contain the component name. To enable
 * logs use the following command:
 *
 * <pre>
 *   adb shell setprop log.tag.class_tag DEBUG
 * </pre>
 */
@RestrictTo(Scope.LIBRARY_GROUP_PREFIX)
public interface LoggingUtils {

    /** LogD a formatted message. */
    void logD(@NonNull String tag,@NonNull  String message);

    /** LogD a formatted message. */
    @FormatMethod
    void logD(@NonNull String tag, @NonNull @FormatString String format, @NonNull Object... args);

    /**
     * Check whether debug logging is allowed or not for the given {@code tag}. This will allow
     * clients to skip building logs if it's not necessary.
     */
    boolean canLogD(@NonNull String tag);
}