app/src/main/java/org/andstatus/app/util/MyLog.java
/**
     * Initialize using a double-check idiom 
     */
Initialize using a double-check idiom
Initialize using a double - check idiom
private static void checkInit() {
        if (initialized) {
            return;
        }
        getMinLogLevel().onSuccess(i -> {
            minLogLevel = i;
            setLogToFile(MyPreferences.isLogEverythingToFile());
            initialized = true;
        });
        if (initialized && Log.INFO >= minLogLevel) {
            Log.i(TAG, MyPreferences.KEY_MIN_LOG_LEVEL + "='" + minLogLevel +"'");
        }
    }
private static void checkInit ( ) { if ( initialized ) { return ; } getMinLogLevel ( ) . onSuccess ( i -> { minLogLevel = i ; setLogToFile ( MyPreferences . isLogEverythingToFile ( ) ) ; initialized = true ; } ) ; if ( initialized && Log . INFO >= minLogLevel ) { Log . i ( TAG , MyPreferences . KEY_MIN_LOG_LEVEL + "='" + minLogLevel + "'" ) ; } }
Initialize using a double-check idiom
Initialize using a double - check idiom