/// <summary> /// Sets up targets to receive log data. /// </summary> public void InitializeLogging() { // Using Log, front-end to the logging chain, emulates android.util.log method signatures. // Wraps Android's native log framework var logWrapper = new LogWrapper(); Log.LogNode = logWrapper; // Filter strips out everything except the message text. var msgFilter = new MessageOnlyLogFilter(); logWrapper.NextNode = msgFilter; // On screen logging via a fragment with a TextView. var logFragment = (LogFragment)FragmentManager.FindFragmentById(Resource.Id.log_fragment); msgFilter.NextNode = logFragment.LogView; }
void InitializeLogging() { // Wraps Android's native log framework. var logWrapper = new LogWrapper(); // Using Log, front-end to the logging chain, emulates android.util.log method signatures. Log.LogNode = logWrapper; // Filter strips out everything except the message text. var msgFilter = new MessageOnlyLogFilter(); logWrapper.NextNode = msgFilter; // On screen logging via a customized TextView. var logView = FindViewById <LogView> (Resource.Id.sample_logview); logView.SetTextAppearance(this, Resource.Style.Log); logView.SetBackgroundColor(Color.White); msgFilter.NextNode = logView; Log.Info(TAG, "Ready"); }
public override void InitializeLogging() { // Wraps Android's native log framework var logWrapper = new LogWrapper(); Log.LogNode = logWrapper; // Filter strips out everything except the message text var msgFilter = new MessageOnlyLogFilter(); logWrapper.NextNode = msgFilter; // On screen logging via a fragment with a TextView var logFragment = (LogFragment)FragmentManager.FindFragmentById(Resource.Id.log_fragment); msgFilter.NextNode = logFragment.LogView; Log.Info(TAG, "Ready"); }