<commit_before>/*
 * Copyright (c) 2016 大前良介 (OHMAE Ryosuke)
 *
 * This software is released under the MIT License.
 * http://opensource.org/licenses/MIT
 */

package net.mm2d.dmsexplorer;

import android.app.Application;

import net.mm2d.util.Log;
import net.mm2d.util.Log.Print;

/**
 * Log出力変更のための継承。
 *
 * @author <a href="mailto:<EMAIL>">大前良介(OHMAE Ryosuke)</a>
 */
public class App extends Application {
    /**
     * デバッグログの出力方法。
     */
    private static class AndroidPrint implements Print {
        @Override
        public void println(int level, String tag, String message) {
            switch (level) {
                default:
                case Log.VERBOSE:
                    android.util.Log.v(tag, message);
                    break;
                case Log.DEBUG:
                    android.util.Log.d(tag, message);
                    break;
                case Log.INFO:
                    android.util.Log.i(tag, message);
                    break;
                case Log.WARN:
                    android.util.Log.w(tag, message);
                    break;
                case Log.ERROR:
                    android.util.Log.e(tag, message);
                    break;
            }
        }
    }

    @Override
    public void onCreate() {
        super.onCreate();
        if (BuildConfig.DEBUG) {
            Log.setLogLevel(Log.VERBOSE);
        } else {
            Log.setLogLevel(Log.ASSERT);
        }
        Log.setPrint(new AndroidPrint());
    }
}<commit_msg>disable log on release build<commit_after>/*
 * Copyright (c) 2016 大前良介 (OHMA<NAME>uke)
 *
 * This software is released under the MIT License.
 * http://opensource.org/licenses/MIT
 */

package net.mm2d.dmsexplorer;

import android.app.Application;

import net.mm2d.util.Log;
import net.mm2d.util.Log.Print;

/**
 * Log出力変更のための継承。
 *
 * @author <a href="mailto:<EMAIL>">大前良介(OHMAE Ryosuke)</a>
 */
public class App extends Application {
    /**
     * デバッグログの出力方法。
     */
    private static class AndroidPrint implements Print {
        @Override
        public void println(int level, String tag, String message) {
            switch (level) {
                default:
                case Log.VERBOSE:
                    android.util.Log.v(tag, message);
                    break;
                case Log.DEBUG:
                    android.util.Log.d(tag, message);
                    break;
                case Log.INFO:
                    android.util.Log.i(tag, message);
                    break;
                case Log.WARN:
                    android.util.Log.w(tag, message);
                    break;
                case Log.ERROR:
                    android.util.Log.e(tag, message);
                    break;
            }
        }
    }

    @Override
    public void onCreate() {
        super.onCreate();
        if (BuildConfig.DEBUG) {
            Log.setLogLevel(Log.VERBOSE);
            Log.setPrint(new AndroidPrint());
            return;
        }
        Log.setLogLevel(Log.ASSERT);
        Log.setPrint((level, tag, message) -> {
        });
    }
}
{'fraction_non_alphanumeric': 0.11050257731958762, 'fraction_numerical': 0.004510309278350515, 'mean_word_length': 1.433385579937304, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7583591', 'n_tokens_mistral': 962, 'n_tokens_neox': 912, 'n_words': 186}