FileDocCategorySizeDatePackage
LogPrinter.javaAPI DocAndroid 5.1 API1889Thu Mar 12 22:22:10 GMT 2015android.util

LogPrinter

public class LogPrinter extends Object implements Printer
Implementation of a {@link android.util.Printer} that sends its output to the system log.

Fields Summary
private final int
mPriority
private final String
mTag
private final int
mBuffer
Constructors Summary
public LogPrinter(int priority, String tag)
Create a new Printer that sends to the log with the given priority and tag.

param
priority The desired log priority: {@link android.util.Log#VERBOSE Log.VERBOSE}, {@link android.util.Log#DEBUG Log.DEBUG}, {@link android.util.Log#INFO Log.INFO}, {@link android.util.Log#WARN Log.WARN}, or {@link android.util.Log#ERROR Log.ERROR}.
param
tag A string tag to associate with each printed log statement.

        mPriority = priority;
        mTag = tag;
        mBuffer = Log.LOG_ID_MAIN;
    
public LogPrinter(int priority, String tag, int buffer)

hide
Same as above, but buffer is one of the LOG_ID_ constants from android.util.Log.

        mPriority = priority;
        mTag = tag;
        mBuffer = buffer;
    
Methods Summary
public voidprintln(java.lang.String x)

        Log.println_native(mBuffer, mPriority, mTag, x);