Java Code Examples for com.example.android.common.logger.MessageOnlyLogFilter#setNext()

The following examples show how to use com.example.android.common.logger.MessageOnlyLogFilter#setNext() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MainActivity.java    From animation-samples with Apache License 2.0 6 votes vote down vote up
/** Create a chain of targets that will receive log data */
@Override
public void initializeLogging() {
    // Wraps Android's native log framework.
    LogWrapper logWrapper = new LogWrapper();
    // Using Log, front-end to the logging chain, emulates android.util.log method signatures.
    Log.setLogNode(logWrapper);

    // Filter strips out everything except the message text.
    MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();
    logWrapper.setNext(msgFilter);

    // On screen logging via a fragment with a TextView.
    LogFragment logFragment = (LogFragment) getSupportFragmentManager()
            .findFragmentById(R.id.log_fragment);
    msgFilter.setNext(logFragment.getLogView());

    Log.i(TAG, "Ready");
}
 
Example 2
Source File: MainActivity.java    From android-FloatingActionButtonBasic with Apache License 2.0 6 votes vote down vote up
/** Create a chain of targets that will receive log data */
@Override
public void initializeLogging() {
    // Wraps Android's native log framework.
    LogWrapper logWrapper = new LogWrapper();
    // Using Log, front-end to the logging chain, emulates android.util.log method signatures.
    Log.setLogNode(logWrapper);

    // Filter strips out everything except the message text.
    MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();
    logWrapper.setNext(msgFilter);

    // On screen logging via a fragment with a TextView.
    LogFragment logFragment = (LogFragment) getSupportFragmentManager()
            .findFragmentById(R.id.log_fragment);
    msgFilter.setNext(logFragment.getLogView());

    Log.i(TAG, "Ready");
}
 
Example 3
Source File: MainActivity.java    From android-play-safetynet with Apache License 2.0 6 votes vote down vote up
/** Create a chain of targets that will receive log data */
@Override
public void initializeLogging() {
    // Wraps Android's native log framework.
    LogWrapper logWrapper = new LogWrapper();
    // Using Log, front-end to the logging chain, emulates android.util.log method signatures.
    Log.setLogNode(logWrapper);

    // Filter strips out everything except the message text.
    MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();
    logWrapper.setNext(msgFilter);

    // On screen logging via a fragment with a TextView.
    LogFragment logFragment = (LogFragment) getSupportFragmentManager()
            .findFragmentById(R.id.log_fragment);
    msgFilter.setNext(logFragment.getLogView());
    if (Build.VERSION.SDK_INT < 23) {
        //noinspection deprecation
        logFragment.getLogView().setTextAppearance(this, R.style.Log);
    } else {
        logFragment.getLogView().setTextAppearance(R.style.Log);
    }
    logFragment.getLogView().setBackgroundColor(Color.WHITE);

    Log.i(TAG, "Ready");
}
 
Example 4
Source File: MainActivity.java    From android-SwipeRefreshLayoutBasic with Apache License 2.0 6 votes vote down vote up
/** Create a chain of targets that will receive log data */
@Override
public void initializeLogging() {
    // Wraps Android's native log framework.
    LogWrapper logWrapper = new LogWrapper();
    // Using Log, front-end to the logging chain, emulates android.util.log method signatures.
    Log.setLogNode(logWrapper);

    // Filter strips out everything except the message text.
    MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();
    logWrapper.setNext(msgFilter);

    // On screen logging via a fragment with a TextView.
    LogFragment logFragment = (LogFragment) getSupportFragmentManager()
            .findFragmentById(R.id.log_fragment);
    msgFilter.setNext(logFragment.getLogView());

    Log.i(TAG, "Ready");
}
 
Example 5
Source File: MainActivity.java    From user-interface-samples with Apache License 2.0 6 votes vote down vote up
/** Create a chain of targets that will receive log data */
@Override
public void initializeLogging() {
    // Wraps Android's native log framework.
    LogWrapper logWrapper = new LogWrapper();
    // Using Log, front-end to the logging chain, emulates android.util.log method signatures.
    Log.setLogNode(logWrapper);

    // Filter strips out everything except the message text.
    MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();
    logWrapper.setNext(msgFilter);

    // On screen logging via a fragment with a TextView.
    LogFragment logFragment = (LogFragment) getSupportFragmentManager()
            .findFragmentById(R.id.log_fragment);
    msgFilter.setNext(logFragment.getLogView());
    logFragment.getLogView().setTextAppearance(this, R.style.Log);
    logFragment.getLogView().setBackgroundColor(Color.WHITE);


    Log.i(TAG, "Ready");
}
 
Example 6
Source File: MainActivity.java    From user-interface-samples with Apache License 2.0 6 votes vote down vote up
/** Create a chain of targets that will receive log data */
@Override
public void initializeLogging() {
    // Wraps Android's native log framework.
    LogWrapper logWrapper = new LogWrapper();
    // Using Log, front-end to the logging chain, emulates android.util.log method signatures.
    Log.setLogNode(logWrapper);

    // Filter strips out everything except the message text.
    MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();
    logWrapper.setNext(msgFilter);

    // On screen logging via a fragment with a TextView.
    LogFragment logFragment = (LogFragment) getSupportFragmentManager()
            .findFragmentById(R.id.log_fragment);
    msgFilter.setNext(logFragment.getLogView());

    Log.i(TAG, "Ready");
}
 
Example 7
Source File: MainActivity.java    From android-RepeatingAlarm with Apache License 2.0 6 votes vote down vote up
/** Create a chain of targets that will receive log data */
@Override
public void initializeLogging() {
    // Wraps Android's native log framework.
    LogWrapper logWrapper = new LogWrapper();
    // Using Log, front-end to the logging chain, emulates android.util.log method signatures.
    Log.setLogNode(logWrapper);

    // Filter strips out everything except the message text.
    MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();
    logWrapper.setNext(msgFilter);

    // On screen logging via a fragment with a TextView.
    LogFragment logFragment = (LogFragment) getSupportFragmentManager()
            .findFragmentById(R.id.log_fragment);
    msgFilter.setNext(logFragment.getLogView());
    logFragment.getLogView().setTextAppearance(this, R.style.Log);
    logFragment.getLogView().setBackgroundColor(Color.WHITE);


    Log.i(TAG, "Ready");
}
 
Example 8
Source File: MainActivity.java    From user-interface-samples with Apache License 2.0 6 votes vote down vote up
/** Create a chain of targets that will receive log data */
@Override
public void initializeLogging() {
    // Wraps Android's native log framework.
    LogWrapper logWrapper = new LogWrapper();
    // Using Log, front-end to the logging chain, emulates android.util.log method signatures.
    Log.setLogNode(logWrapper);

    // Filter strips out everything except the message text.
    MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();
    logWrapper.setNext(msgFilter);

    // On screen logging via a fragment with a TextView.
    LogFragment logFragment = (LogFragment) getSupportFragmentManager()
            .findFragmentById(R.id.log_fragment);
    msgFilter.setNext(logFragment.getLogView());

    Log.i(TAG, "Ready");
}
 
Example 9
Source File: MainActivity.java    From graphics-samples with Apache License 2.0 6 votes vote down vote up
/**
 * Create a chain of targets that will receive log data
 */
@Override
public void initializeLogging() {
    // Wraps Android's native log framework.
    LogWrapper logWrapper = new LogWrapper();
    // Using Log, front-end to the logging chain, emulates android.util.log method signatures.
    Log.setLogNode(logWrapper);

    // Filter strips out everything except the message text.
    MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();
    logWrapper.setNext(msgFilter);

    // On screen logging via a fragment with a TextView.
    LogFragment logFragment = (LogFragment) getSupportFragmentManager()
            .findFragmentById(R.id.log_fragment);
    msgFilter.setNext(logFragment.getLogView());

    Log.i(TAG, "Ready");
}
 
Example 10
Source File: MainActivity.java    From android-CardReader with Apache License 2.0 6 votes vote down vote up
/** Create a chain of targets that will receive log data */
@Override
public void initializeLogging() {
    // Wraps Android's native log framework.
    LogWrapper logWrapper = new LogWrapper();
    // Using Log, front-end to the logging chain, emulates android.util.log method signatures.
    Log.setLogNode(logWrapper);

    // Filter strips out everything except the message text.
    MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();
    logWrapper.setNext(msgFilter);

    // On screen logging via a fragment with a TextView.
    LogFragment logFragment = (LogFragment) getSupportFragmentManager()
            .findFragmentById(R.id.log_fragment);
    msgFilter.setNext(logFragment.getLogView());

    Log.i(TAG, "Ready");
}
 
Example 11
Source File: MainActivity.java    From android-DragAndDropAcrossApps with Apache License 2.0 6 votes vote down vote up
/** Create a chain of targets that will receive log data */
@Override
public void initializeLogging() {
    // Wraps Android's native log framework.
    LogWrapper logWrapper = new LogWrapper();
    // Using Log, front-end to the logging chain, emulates android.util.log method signatures.
    Log.setLogNode(logWrapper);

    // Filter strips out everything except the message text.
    MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();
    logWrapper.setNext(msgFilter);

    // On screen logging via a fragment with a TextView.
    LogFragment logFragment = (LogFragment) getSupportFragmentManager()
            .findFragmentById(R.id.log_fragment);
    msgFilter.setNext(logFragment.getLogView());

    Log.i(TAG, "Ready");
}
 
Example 12
Source File: MainActivity.java    From android-ImmersiveMode with Apache License 2.0 6 votes vote down vote up
/** Create a chain of targets that will receive log data */
@Override
public void initializeLogging() {
    // Wraps Android's native log framework.
    LogWrapper logWrapper = new LogWrapper();
    // Using Log, front-end to the logging chain, emulates android.util.log method signatures.
    Log.setLogNode(logWrapper);

    // Filter strips out everything except the message text.
    MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();
    logWrapper.setNext(msgFilter);

    // On screen logging via a fragment with a TextView.
    LogFragment logFragment = (LogFragment) getSupportFragmentManager()
            .findFragmentById(R.id.log_fragment);
    msgFilter.setNext(logFragment.getLogView());
    logFragment.getLogView().setTextAppearance(this, R.style.Log);
    logFragment.getLogView().setBackgroundColor(Color.WHITE);


    Log.i(TAG, "Ready");
}
 
Example 13
Source File: MainActivity.java    From animation-samples with Apache License 2.0 6 votes vote down vote up
/** Create a chain of targets that will receive log data */
@Override
public void initializeLogging() {
    // Wraps Android's native log framework.
    LogWrapper logWrapper = new LogWrapper();
    // Using Log, front-end to the logging chain, emulates android.util.log method signatures.
    Log.setLogNode(logWrapper);

    // Filter strips out everything except the message text.
    MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();
    logWrapper.setNext(msgFilter);

    // On screen logging via a fragment with a TextView.
    LogFragment logFragment = (LogFragment) getSupportFragmentManager()
            .findFragmentById(R.id.log_fragment);
    msgFilter.setNext(logFragment.getLogView());

    Log.i(TAG, "Ready");
}
 
Example 14
Source File: MainActivity.java    From android-SynchronizedNotifications with Apache License 2.0 6 votes vote down vote up
/** Create a chain of targets that will receive log data */
@Override
public void initializeLogging() {
    // Wraps Android's native log framework.
    LogWrapper logWrapper = new LogWrapper();
    // Using Log, front-end to the logging chain, emulates android.util.log method signatures.
    Log.setLogNode(logWrapper);

    // Filter strips out everything except the message text.
    MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();
    logWrapper.setNext(msgFilter);

    // On screen logging via a fragment with a TextView.
    LogFragment logFragment = (LogFragment) getSupportFragmentManager()
            .findFragmentById(R.id.log_fragment);
    msgFilter.setNext(logFragment.getLogView());
    logFragment.getLogView().setTextAppearance(this, R.style.Log);
    logFragment.getLogView().setBackgroundColor(Color.WHITE);

    Log.i(TAG, "Ready");
}
 
Example 15
Source File: MainActivity.java    From android-RecyclerView with Apache License 2.0 6 votes vote down vote up
/** Create a chain of targets that will receive log data */
@Override
public void initializeLogging() {
    // Wraps Android's native log framework.
    LogWrapper logWrapper = new LogWrapper();
    // Using Log, front-end to the logging chain, emulates android.util.log method signatures.
    Log.setLogNode(logWrapper);

    // Filter strips out everything except the message text.
    MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();
    logWrapper.setNext(msgFilter);

    // On screen logging via a fragment with a TextView.
    LogFragment logFragment = (LogFragment) getSupportFragmentManager()
            .findFragmentById(R.id.log_fragment);
    msgFilter.setNext(logFragment.getLogView());

    Log.i(TAG, "Ready");
}
 
Example 16
Source File: MainActivity.java    From views-widgets-samples with Apache License 2.0 6 votes vote down vote up
/** Create a chain of targets that will receive log data */
@Override
public void initializeLogging() {
    // Wraps Android's native log framework.
    LogWrapper logWrapper = new LogWrapper();
    // Using Log, front-end to the logging chain, emulates android.util.log method signatures.
    Log.setLogNode(logWrapper);

    // Filter strips out everything except the message text.
    MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();
    logWrapper.setNext(msgFilter);

    // On screen logging via a fragment with a TextView.
    LogFragment logFragment = (LogFragment) getSupportFragmentManager()
            .findFragmentById(R.id.log_fragment);
    msgFilter.setNext(logFragment.getLogView());

    Log.i(TAG, "Ready");
}
 
Example 17
Source File: MainActivity.java    From android-ActiveNotifications with Apache License 2.0 6 votes vote down vote up
/** Create a chain of targets that will receive log data */
@Override
public void initializeLogging() {
    // Wraps Android's native log framework.
    LogWrapper logWrapper = new LogWrapper();
    // Using Log, front-end to the logging chain, emulates android.util.log method signatures.
    Log.setLogNode(logWrapper);

    // Filter strips out everything except the message text.
    MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();
    logWrapper.setNext(msgFilter);

    // On screen logging via a fragment with a TextView.
    LogFragment logFragment = (LogFragment) getSupportFragmentManager()
            .findFragmentById(R.id.log_fragment);
    msgFilter.setNext(logFragment.getLogView());

    Log.i(TAG, "Ready");
}
 
Example 18
Source File: MainActivity.java    From views-widgets-samples with Apache License 2.0 6 votes vote down vote up
/** Create a chain of targets that will receive log data */
@Override
public void initializeLogging() {
    // Wraps Android's native log framework.
    LogWrapper logWrapper = new LogWrapper();
    // Using Log, front-end to the logging chain, emulates android.util.log method signatures.
    Log.setLogNode(logWrapper);

    // Filter strips out everything except the message text.
    MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();
    logWrapper.setNext(msgFilter);

    // On screen logging via a fragment with a TextView.
    LogFragment logFragment = (LogFragment) getSupportFragmentManager()
            .findFragmentById(R.id.log_fragment);
    msgFilter.setNext(logFragment.getLogView());

    Log.i(TAG, "Ready");
}
 
Example 19
Source File: MainActivity.java    From connectivity-samples with Apache License 2.0 6 votes vote down vote up
/** Create a chain of targets that will receive log data */
@Override
public void initializeLogging() {
    // Wraps Android's native log framework.
    LogWrapper logWrapper = new LogWrapper();
    // Using Log, front-end to the logging chain, emulates android.util.log method signatures.
    Log.setLogNode(logWrapper);

    // Filter strips out everything except the message text.
    MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();
    logWrapper.setNext(msgFilter);

    // On screen logging via a fragment with a TextView.
    LogFragment logFragment = (LogFragment) getSupportFragmentManager()
            .findFragmentById(R.id.log_fragment);
    msgFilter.setNext(logFragment.getLogView());
    logFragment.getLogView().setTextAppearance(this, R.style.Log);
    logFragment.getLogView().setBackgroundColor(Color.WHITE);

    Log.i(TAG, "Ready");
}
 
Example 20
Source File: MainActivity.java    From connectivity-samples with Apache License 2.0 6 votes vote down vote up
/**
 * Create a chain of targets that will receive log data
 */
@Override
public void initializeLogging() {
    // Wraps Android's native log framework.
    LogWrapper logWrapper = new LogWrapper();
    // Using Log, front-end to the logging chain, emulates android.util.log method signatures.
    Log.setLogNode(logWrapper);

    // Filter strips out everything except the message text.
    MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();
    logWrapper.setNext(msgFilter);

    // On screen logging via a fragment with a TextView.
    LogFragment logFragment = (LogFragment) getSupportFragmentManager()
            .findFragmentById(R.id.log_fragment);
    msgFilter.setNext(logFragment.getLogView());

    Log.i(TAG, "Ready");
}