Java Code Examples for com.facebook.common.logging.FLog#setMinimumLoggingLevel()
The following examples show how to use
com.facebook.common.logging.FLog#setMinimumLoggingLevel() .
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 Neptune with Apache License 2.0 | 6 votes |
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); Fresco.initialize(this); FLog.setMinimumLoggingLevel(FLog.VERBOSE); setContentView(R.layout.activity_main); Log.i(TAG, "MainActivity onCreate() called"); mRecyclerView = (RecyclerView) findViewById(R.id.recycler_view); List<String> mImageUrls = Arrays.asList(URL_LINKS); mAdapter = new ImageAdapter(this, mImageUrls); mRecyclerView.setLayoutManager(new LinearLayoutManager(this)); mRecyclerView.setAdapter(mAdapter); TextView ticker = findViewById(R.id.time_ticker); ticker.setText(BuildConfig.BUILD_TIME); }
Example 2
Source File: FrescoHelper.java From base-module with Apache License 2.0 | 6 votes |
public void init(Context context, ImagePipelineConfig config) { if(config == null) { ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); ImagePipelineConfig.Builder builder = ImagePipelineConfig.newBuilder(context) .setResizeAndRotateEnabledForNetwork(true) .setBitmapsConfig(Bitmap.Config.ARGB_8888) .setBitmapMemoryCacheParamsSupplier(new MyBitmapMemoryCacheParamsSupplier(activityManager)) .setDownsampleEnabled(true); if (isVLoggable || isDLoggable) { Set<RequestListener> requestListeners = new HashSet<>(); requestListeners.add(new RequestLoggingListener()); builder.setRequestListeners(requestListeners); int level = isVLoggable ? FLog.VERBOSE : FLog.DEBUG; FLog.setMinimumLoggingLevel(level); } config = builder.build(); } context.getApplicationContext().registerComponentCallbacks(this); Fresco.initialize(context, config); }
Example 3
Source File: GalleryApplication.java From CommentGallery with Apache License 2.0 | 5 votes |
@Override public void onCreate() { super.onCreate(); FLog.setMinimumLoggingLevel(FLog.VERBOSE); Set<RequestListener> listeners = new HashSet<>(); listeners.add(new RequestLoggingListener()); ImagePipelineConfig config = ImagePipelineConfig.newBuilder(this) .setRequestListeners(listeners) .build(); Fresco.initialize(this, config); }
Example 4
Source File: MyApp.java From WindowImageView with MIT License | 5 votes |
@Override public void onCreate() { super.onCreate(); Set<RequestListener> requestListeners = new HashSet<>(); requestListeners.add(new RequestLoggingListener()); ImagePipelineConfig config = ImagePipelineConfig.newBuilder(this) // other setters .setRequestListeners(requestListeners) .build(); Fresco.initialize(this, config); FLog.setMinimumLoggingLevel(FLog.VERBOSE); }
Example 5
Source File: XLogModule.java From react-native-xlog with MIT License | 5 votes |
private static void init(XLogSetting setting, Context context) { // https://github.com/Tencent/mars#android System.loadLibrary("stlport_shared"); System.loadLibrary("marsxlog"); sXLogSetting = setting; Log.setLogImp(new Xlog()); FLog.setLoggingDelegate(new FLogging2XLogDelegate()); // 重定向RN原生log(FLog)到xlog FLog.setMinimumLoggingLevel(setting.getLevel());// FLog的日志级别和xlog一致 if (context != null) { XLogCustomCrashHandler.getInstance().register(context); // 捕获全局的crash信息 } }
Example 6
Source File: MainApplication.java From drawee-text-view with Apache License 2.0 | 5 votes |
@Override public void onCreate() { super.onCreate(); // initialize fresco with enabled webp Fresco.initialize(this, ImagePipelineConfig.newBuilder(this) .experiment() .setWebpSupportEnabled(true) .build()); // for debug if (BuildConfig.DEBUG) { FLogDefaultLoggingDelegate.getInstance().setApplicationTag("Drawee-text"); FLog.setMinimumLoggingLevel(Log.VERBOSE); } }
Example 7
Source File: ViewPagerActivity.java From ZoomableDraweeView-sample with Apache License 2.0 | 5 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Fresco.initialize(this); FLog.setMinimumLoggingLevel(FLog.VERBOSE); setContentView(R.layout.activity_view_pager); vpGallery = (ViewPager) findViewById(R.id.vp_gallery); vpGallery.setAdapter(new GalleryAdapter()); }
Example 8
Source File: ScrollTest.java From fresco with MIT License | 5 votes |
@Override public void setUp() throws Exception { super.setUp(); mActivity = getActivity(); mImageList = (RecyclerView) mActivity.findViewById(R.id.image_grid); mLoaderSelect = (Spinner) mActivity.findViewById(R.id.loader_select); mSourceSelect = (Spinner) mActivity.findViewById(R.id.source_select); FLog.setMinimumLoggingLevel(FLog.INFO); }
Example 9
Source File: AnimationApplication.java From fresco with MIT License | 5 votes |
@Override public void onCreate() { super.onCreate(); FLog.setMinimumLoggingLevel(FLog.VERBOSE); Set<RequestListener> listeners = new HashSet<>(); listeners.add(new RequestLoggingListener()); ImagePipelineConfig config = ImagePipelineConfig.newBuilder(this).setRequestListeners(listeners).build(); Fresco.initialize(this, config); }
Example 10
Source File: ZoomableApplication.java From fresco with MIT License | 5 votes |
@Override public void onCreate() { super.onCreate(); FLog.setMinimumLoggingLevel(FLog.VERBOSE); Set<RequestListener> listeners = new HashSet<>(); listeners.add(new RequestLoggingListener()); ImagePipelineConfig config = ImagePipelineConfig.newBuilder(this).setRequestListeners(listeners).build(); Fresco.initialize(this, config); }
Example 11
Source File: PriorityNetworkFetcherTest.java From fresco with MIT License | 4 votes |
@BeforeClass public static void beforeClass() { defaultMinimumLoggingLevel = FLog.getMinimumLoggingLevel(); FLog.setMinimumLoggingLevel(FLog.VERBOSE); }
Example 12
Source File: PriorityNetworkFetcherTest.java From fresco with MIT License | 4 votes |
@AfterClass public static void afterClass() { FLog.setMinimumLoggingLevel(defaultMinimumLoggingLevel); }