Java Code Examples for com.facebook.common.logging.FLog#i()
The following examples show how to use
com.facebook.common.logging.FLog#i() .
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 react-native-xlog with MIT License | 6 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Log.v(TAG, "if you open xlog in application's onCreate(), rather than delay to RNView, you may see me"); Log.e(TAG, "if you open xlog in application's onCreate(), rather than delay to RNView, you may see me"); Log.i(TAG, "if you open xlog in application's onCreate(), rather than delay to RNView, you may see me"); Log.w(TAG, "if you open xlog in application's onCreate(), rather than delay to RNView, you may see me"); Log.e(TAG, "if you open xlog in application's onCreate(), rather than delay to RNView, you may see me"); Log.f(TAG, "if you open xlog in application's onCreate(), rather than delay to RNView, you may see me"); Log.i(TAG, "if you open xlog in application's onCreate(), rather than delay to RNView, you may see me"); FLog.v(F_TAG, "if you open xlog in application's onCreate(), rather than delay to RNView, you may see me"); FLog.e(F_TAG, "if you open xlog in application's onCreate(), rather than delay to RNView, you may see me"); FLog.i(F_TAG, "if you open xlog in application's onCreate(), rather than delay to RNView, you may see me"); FLog.w(F_TAG, "if you open xlog in application's onCreate(), rather than delay to RNView, you may see me"); FLog.e(F_TAG, "if you open xlog in application's onCreate(), rather than delay to RNView, you may see me"); FLog.wtf(F_TAG, "if you open xlog in application's onCreate(), rather than delay to RNView, you may see me"); android.util.Log.wtf("android-" + TAG, "you can't see me in xlog file"); }
Example 2
Source File: SQLitePlugin.java From react-native-sqlite-storage with MIT License | 6 votes |
DBRunner(final String dbname, ReadableMap options, CallbackContext cbc) { this.dbname = dbname; int openFlags = SQLiteOpenFlags.CREATE | SQLiteOpenFlags.READWRITE; try { this.assetFilename = SQLitePluginConverter.getString(options,"assetFilename",null); if (this.assetFilename != null && this.assetFilename.length() > 0) { boolean readOnly = SQLitePluginConverter.getBoolean(options,"readOnly",false); openFlags = readOnly ? SQLiteOpenFlags.READONLY : openFlags; } } catch (Exception ex){ FLog.e(TAG,"Error retrieving assetFilename or mode from options:",ex); } this.openFlags = openFlags; this.oldImpl = SQLitePluginConverter.getBoolean(options,"androidOldDatabaseImplementation",false); FLog.v(TAG, "Android db implementation: " + (oldImpl ? "OLD" : "sqlite4java (NDK)")); this.androidLockWorkaround = this.oldImpl && SQLitePluginConverter.getBoolean(options,"androidLockWorkaround",false); if (this.androidLockWorkaround) FLog.i(TAG, "Android db closing/locking workaround applied"); this.q = new LinkedBlockingQueue<>(); this.openCbc = cbc; }
Example 3
Source File: SQLitePlugin.java From react-native-sqlite-storage with MIT License | 6 votes |
DBRunner(final String dbname, ReadableMap options, CallbackContext cbc) { this.dbname = dbname; int openFlags = SQLiteDatabase.OPEN_READWRITE | SQLiteDatabase.CREATE_IF_NECESSARY; try { this.assetFilename = SQLitePluginConverter.getString(options,"assetFilename",null); if (this.assetFilename != null && this.assetFilename.length() > 0) { boolean readOnly = SQLitePluginConverter.getBoolean(options,"readOnly",false); openFlags = readOnly ? SQLiteDatabase.OPEN_READONLY : openFlags; } } catch (Exception ex){ FLog.e(TAG,"Error retrieving assetFilename or mode from options:",ex); } this.openFlags = openFlags; this.androidLockWorkaround = SQLitePluginConverter.getBoolean(options,"androidLockWorkaround",false); if (this.androidLockWorkaround) FLog.i(TAG, "Android db closing/locking workaround applied"); this.q = new LinkedBlockingQueue<DBQuery>(); this.openCbc = cbc; }
Example 4
Source File: MainActivity.java From fresco with MIT License | 6 votes |
private void updateStats() { final Runtime runtime = Runtime.getRuntime(); final long heapMemory = runtime.totalMemory() - runtime.freeMemory(); final StringBuilder sb = new StringBuilder(DEFAULT_MESSAGE_SIZE); // When changing format of output below, make sure to sync "run_comparison.py" as well sb.append("Heap: "); appendSize(sb, heapMemory); sb.append(" Java "); appendSize(sb, Debug.getNativeHeapSize()); sb.append(" native\n"); appendTime(sb, "Avg wait time: ", mPerfListener.getAverageWaitTime(), "\n"); appendNumber(sb, "Requests: ", mPerfListener.getOutstandingRequests(), " outsdng "); appendNumber(sb, "", mPerfListener.getCancelledRequests(), " cncld\n"); final String message = sb.toString(); mStatsDisplay.setText(message); FLog.i(TAG, message); }
Example 5
Source File: Instrumentation.java From fresco with MIT License | 5 votes |
public void onCancellation() { if (mState != ImageRequestState.STARTED) { return; } mState = ImageRequestState.CANCELLATION; mFinishTime = System.currentTimeMillis(); final long elapsedTime = mFinishTime - mStartTime; mPerfListener.reportCancellation(elapsedTime); FLog.i(TAG, "Image [%s]: cancelled after %d ms", mTag, elapsedTime); }
Example 6
Source File: RNCAppearanceModule.java From react-native-appearance with MIT License | 5 votes |
private void sendEvent(ReactContext reactContext, String eventName, @Nullable WritableMap params) { if (reactContext.hasActiveCatalystInstance()) { FLog.i("sendEvent", eventName + ": " + params.toString()); reactContext .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class) .emit(eventName, params); } }
Example 7
Source File: Instrumentation.java From fresco with MIT License | 5 votes |
public void onFailure() { Preconditions.checkState(mState == ImageRequestState.STARTED); mState = ImageRequestState.FAILURE; mFinishTime = System.currentTimeMillis(); final long elapsedTime = mFinishTime - mStartTime; mPerfListener.reportFailure(elapsedTime); FLog.i(TAG, "Image [%s]: failed after %d ms", mTag, elapsedTime); }
Example 8
Source File: Instrumentation.java From fresco with MIT License | 5 votes |
public void onSuccess() { Preconditions.checkState(mState == ImageRequestState.STARTED); mState = ImageRequestState.SUCCESS; mFinishTime = System.currentTimeMillis(); final long elapsedTime = mFinishTime - mStartTime; mPerfListener.reportSuccess(elapsedTime); FLog.i(TAG, "Image [%s]: loaded after %d ms", mTag, elapsedTime); }
Example 9
Source File: Instrumentation.java From fresco with MIT License | 5 votes |
public void onStart() { Preconditions.checkNotNull(mTag); Preconditions.checkNotNull(mPerfListener); if (mState == ImageRequestState.STARTED) { onCancellation(); } mStartTime = System.currentTimeMillis(); mFinishTime = 0; mPerfListener.reportStart(); mState = ImageRequestState.STARTED; FLog.i(TAG, "Image [%s]: loading started...", mTag); }
Example 10
Source File: Instrumentation.java From fresco with MIT License | 5 votes |
public void onCancellation() { if (mState != ImageRequestState.STARTED) { return; } mState = ImageRequestState.CANCELLATION; mFinishTime = System.currentTimeMillis(); final long elapsedTime = mFinishTime - mStartTime; mPerfListener.reportCancellation(elapsedTime); FLog.i(TAG, "Image [%s]: cancelled after %d ms", mTag, elapsedTime); }
Example 11
Source File: Instrumentation.java From fresco with MIT License | 5 votes |
public void onFailure() { Preconditions.checkState(mState == ImageRequestState.STARTED); mState = ImageRequestState.FAILURE; mFinishTime = System.currentTimeMillis(); final long elapsedTime = mFinishTime - mStartTime; mPerfListener.reportFailure(elapsedTime); FLog.i(TAG, "Image [%s]: failed after %d ms", mTag, elapsedTime); }
Example 12
Source File: Instrumentation.java From fresco with MIT License | 5 votes |
public void onSuccess() { Preconditions.checkState(mState == ImageRequestState.STARTED); mState = ImageRequestState.SUCCESS; mFinishTime = System.currentTimeMillis(); final long elapsedTime = mFinishTime - mStartTime; mPerfListener.reportSuccess(elapsedTime); FLog.i(TAG, "Image [%s]: loaded after %d ms", mTag, elapsedTime); }
Example 13
Source File: Instrumentation.java From fresco with MIT License | 5 votes |
public void onStart() { Preconditions.checkNotNull(mTag); Preconditions.checkNotNull(mPerfListener); if (mState == ImageRequestState.STARTED) { onCancellation(); } mStartTime = System.currentTimeMillis(); mFinishTime = 0; mPerfListener.reportStart(); mState = ImageRequestState.STARTED; FLog.i(TAG, "Image [%s]: loading started...", mTag); }
Example 14
Source File: ApplicationBadgeHelper.java From react-native-push-notification with MIT License | 5 votes |
private void tryAutomaticBadge(Context context, int number) { if (null == applyAutomaticBadger) { applyAutomaticBadger = ShortcutBadger.applyCount(context, number); if (applyAutomaticBadger) { FLog.i(LOG_TAG, "First attempt to use automatic badger succeeded; permanently enabling method."); } else { FLog.i(LOG_TAG, "First attempt to use automatic badger failed; permanently disabling method."); } return; } else if (!applyAutomaticBadger) { return; } ShortcutBadger.applyCount(context, number); }
Example 15
Source File: TiffUtil.java From FanXin-based-HuanXin with GNU General Public License v2.0 | 5 votes |
/** * Determines auto-rotate angle based on orientation information. * @param orientation orientation information read from APP1 EXIF (TIFF) block. * @return orientation: 1/3/6/8 -> 0/180/90/270. */ public static int getAutoRotateAngleFromOrientation(int orientation) { switch (orientation) { case 1: return 0; case 3: return 180; case 6: return 90; case 8: return 270; } FLog.i(TAG, "Unsupported orientation"); return 0; }
Example 16
Source File: OrientationModule.java From react-native-orientation-locker with MIT License | 5 votes |
@Override public void onHostResume() { FLog.i(ReactConstants.TAG, "orientation detect enabled."); mOrientationListener.enable(); final Activity activity = getCurrentActivity(); if (activity == null) return; activity.registerReceiver(mReceiver, new IntentFilter("onConfigurationChanged")); }
Example 17
Source File: LocationModule.java From react-native-GPay with MIT License | 5 votes |
@Override public void run() { synchronized (SingleUpdateRequest.this) { if (!mTriggered) { mError.invoke(PositionError.buildError(PositionError.TIMEOUT, "Location request timed out")); mLocationManager.removeUpdates(mLocationListener); FLog.i(ReactConstants.TAG, "LocationModule: Location request timed out"); mTriggered = true; } } }
Example 18
Source File: ApplicationBadgeHelper.java From react-native-push-notification-CE with MIT License | 5 votes |
private void tryLegacySamsungBadge(Context context, int number) { // First attempt to apply legacy samsung badge. Check if eligible, then attempt it. if (null == applySamsungBadger) { applySamsungBadger = isLegacySamsungLauncher(context) && applyLegacySamsungBadge(context, number); if (applySamsungBadger) { FLog.i(LOG_TAG, "First attempt to use legacy Samsung badger succeeded; permanently enabling method."); } else { FLog.w(LOG_TAG, "First attempt to use legacy Samsung badger failed; permanently disabling method."); } return; } else if (!applySamsungBadger) { return; } applyLegacySamsungBadge(context, number); }
Example 19
Source File: ApplicationBadgeHelper.java From react-native-push-notification-CE with MIT License | 5 votes |
private void tryAutomaticBadge(Context context, int number) { if (null == applyAutomaticBadger) { applyAutomaticBadger = ShortcutBadger.applyCount(context, number); if (applyAutomaticBadger) { FLog.i(LOG_TAG, "First attempt to use automatic badger succeeded; permanently enabling method."); } else { FLog.i(LOG_TAG, "First attempt to use automatic badger failed; permanently disabling method."); } return; } else if (!applyAutomaticBadger) { return; } ShortcutBadger.applyCount(context, number); }
Example 20
Source File: RNCAppearanceModule.java From react-native-appearance with MIT License | 5 votes |
private void sendEvent(String eventName, @Nullable WritableMap params) { if (getReactApplicationContext().hasActiveCatalystInstance()) { FLog.i("sendEvent", eventName + ": " + params.toString()); getReactApplicationContext() .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class) .emit(eventName, params); } }