Java Code Examples for com.danimahardhika.android.helpers.core.utils.LogUtil#setLoggingEnabled()
The following examples show how to use
com.danimahardhika.android.helpers.core.utils.LogUtil#setLoggingEnabled() .
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: CandyBarApplication.java From candybar with Apache License 2.0 | 5 votes |
@Override public void onCreate() { super.onCreate(); Database.get(this).openDatabase(); if (!ImageLoader.getInstance().isInited()) ImageLoader.getInstance().init(ImageConfig.getImageLoaderConfiguration(this)); ViewPump.init(ViewPump.builder() .addInterceptor(new CalligraphyInterceptor( new CalligraphyConfig.Builder() .setDefaultFontPath("fonts/Font-Regular.ttf") .setFontAttrId(R.attr.fontPath) .build())) .build()); //Enable or disable logging LogUtil.setLoggingTag(getString(R.string.app_name)); LogUtil.setLoggingEnabled(true); mConfiguration = onInit(); if (mConfiguration.mIsCrashReportEnabled) { mHandler = Thread.getDefaultUncaughtExceptionHandler(); Thread.setDefaultUncaughtExceptionHandler(this::handleUncaughtException); } if (Preferences.get(this).isTimeToSetLanguagePreference()) { Preferences.get(this).setLanguagePreference(); return; } LocaleHelper.setLocale(this); }
Example 2
Source File: CandyBarApplication.java From candybar-library with Apache License 2.0 | 5 votes |
@Override public void onCreate() { super.onCreate(); Database.get(this).openDatabase(); if (!ImageLoader.getInstance().isInited()) ImageLoader.getInstance().init(ImageConfig.getImageLoaderConfiguration(this)); CalligraphyConfig.initDefault(new CalligraphyConfig.Builder() .setDefaultFontPath("fonts/Font-Regular.ttf") .setFontAttrId(R.attr.fontPath) .build()); //Enable or disable logging LogUtil.setLoggingTag(getString(R.string.app_name)); LogUtil.setLoggingEnabled(true); mConfiguration = onInit(); if (mConfiguration.mIsCrashReportEnabled) { mHandler = Thread.getDefaultUncaughtExceptionHandler(); Thread.setDefaultUncaughtExceptionHandler(this::handleUncaughtException); } if (Preferences.get(this).isTimeToSetLanguagePreference()) { Preferences.get(this).setLanguagePreference(); return; } LocaleHelper.setLocale(this); }
Example 3
Source File: WallpaperBoardApplication.java From wallpaperboard with Apache License 2.0 | 4 votes |
@Override public void onCreate() { super.onCreate(); Database.get(this).openDatabase(); Preferences.get(this); if (!ImageLoader.getInstance().isInited()) ImageLoader.getInstance().init(ImageConfig.getImageLoaderConfiguration(this)); CalligraphyConfig.initDefault(new CalligraphyConfig.Builder() .setDefaultFontPath("fonts/Font-Regular.ttf") .setFontAttrId(R.attr.fontPath) .build()); //Enable logging LogUtil.setLoggingTag(getString(R.string.app_name)); LogUtil.setLoggingEnabled(true); mConfiguration = onInit(); if (mConfiguration.isCrashReportEnabled()) { String[] urls = getResources().getStringArray(R.array.about_social_links); boolean isContainsValidEmail = false; for (String url : urls) { if (UrlHelper.getType(url) == UrlHelper.Type.EMAIL) { isContainsValidEmail = true; mConfiguration.setCrashReportEmail(url); break; } } if (isContainsValidEmail) { mHandler = Thread.getDefaultUncaughtExceptionHandler(); Thread.setDefaultUncaughtExceptionHandler(this::handleUncaughtException); } else { mConfiguration.setCrashReportEnabled(false); mConfiguration.setCrashReportEmail(null); } } LocaleHelper.setLocale(this); }