Java Code Examples for com.example.android.common.logger.Log#setLogNode()

The following examples show how to use com.example.android.common.logger.Log#setLogNode() . 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 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 2
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 3
Source File: MainActivity.java    From enterprise-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 4
Source File: MainActivity.java    From android-AdvancedImmersiveMode 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: LoggingActivity.java    From views-widgets-samples with Apache License 2.0 6 votes vote down vote up
/** Set up targets to receive log data */
public void initializeLogging() {
    // Using Log, front-end to the logging chain, emulates android.util.log method signatures.
    // Wraps Android's native log framework
    LogWrapper logWrapper = new LogWrapper();
    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());
}
 
Example 6
Source File: MainActivity.java    From input-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 7
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 8
Source File: MainActivity.java    From android-BasicAndroidKeyStore 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 9
Source File: SampleActivityBase.java    From enterprise-samples with Apache License 2.0 5 votes vote down vote up
/**
 * Set up targets to receive log data
 */
public void initializeLogging() {
    // Using Log, front-end to the logging chain, emulates android.util.log method signatures.
    // Wraps Android's native log framework
    LogWrapper logWrapper = new LogWrapper();
    Log.setLogNode(logWrapper);

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

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

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

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

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

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

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

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

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

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

    Log.i(TAG, "Ready");
}
 
Example 20
Source File: SampleActivityBase.java    From android-play-places with Apache License 2.0 5 votes vote down vote up
/** Set up targets to receive log data */
public void initializeLogging() {
    // Using Log, front-end to the logging chain, emulates android.util.log method signatures.
    // Wraps Android's native log framework
    LogWrapper logWrapper = new LogWrapper();
    Log.setLogNode(logWrapper);

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