本文整理匯總了Java中ua.at.tsvetkov.util.Log.i方法的典型用法代碼示例。如果您正苦於以下問題:Java Log.i方法的具體用法?Java Log.i怎麽用?Java Log.i使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ua.at.tsvetkov.util.Log
的用法示例。
在下文中一共展示了Log.i方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: enableStrictMode
import ua.at.tsvetkov.util.Log; //導入方法依賴的package包/類
/**
* Enable StrictMode in the app. Put call in the first called onCreate() method in Application or Activity.
*
* @param aContext the app Context
*/
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public static void enableStrictMode(Context aContext) {
try {
int appFlags = aContext.getApplicationInfo().flags;
if ((appFlags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder().detectDiskReads().detectDiskWrites().detectNetwork().penaltyLog().build());
StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder().detectActivityLeaks().detectLeakedSqlLiteObjects().detectLeakedClosableObjects().penaltyLog().penaltyDeath().build());
}
isStrictMode = true;
Log.i("StrictMode is enabled.");
} catch (Throwable throwable) {
isStrictMode = false;
Log.i("StrictMode is not supported. Skipping...");
}
}
示例2: DataProcessorConfiguration
import ua.at.tsvetkov.util.Log; //導入方法依賴的package包/類
private DataProcessorConfiguration(final Builder builder) {
isLogEnabled = builder.isLogEnabled;
httpUserAgent = builder.httpUserAgent;
timeout = builder.timeout;
isThreadPoolEnabled = builder.isThreadPoolEnabled;
host = builder.host;
port = builder.port;
scheme = builder.scheme;
encoding = builder.encoding;
isCheckingRequestStringEnabled = builder.isCheckingRequestStringEnabled;
isShowProcessingTime = builder.isShowProcessingTime;
testServerUrl = builder.testServerUrl;
isCacheEnabled = builder.isCacheEnabled;
cacheSize = builder.cacheSize;
if (isLogEnabled) {
Log.i("========= Data Processor Configuration ==========");
Log.i("Host = " + scheme + host + port);
Log.i("Test url = " + testServerUrl);
Log.i("isShowProcessingTime = " + isShowProcessingTime);
if (isCacheEnabled) {
Log.i("isCacheEnabled = true, cacheSize = " + cacheSize);
} else {
Log.i("isCacheEnabled = false");
}
Log.i("httpUserAgent = " + httpUserAgent);
Log.i("=================================================");
}
}
示例3: isValid
import ua.at.tsvetkov.util.Log; //導入方法依賴的package包/類
public boolean isValid() {
boolean result = true;
for (AbstractValidator fieldHolder : mFieldHolderList) {
if (!fieldHolder.isValid()) {
fieldHolder.setError();
Log.w(fieldHolder.getFieldName() + " > Not correct data in field: " + fieldHolder.getContentString());
result = false;
} else {
Log.i(fieldHolder.getFieldName() + " > Correct data in field: " + fieldHolder.getContentString());
}
}
return result;
}
示例4: createDir
import ua.at.tsvetkov.util.Log; //導入方法依賴的package包/類
/**
* Create a dirs in the working dir
*
* @param subDir sub directory
* @return full path
*/
public static String createDir(@NonNull Context context, @NonNull String subDir) {
String path = context.getFilesDir() + subDir;
File dir = new File(path);
if (!dir.exists()) {
boolean result = dir.mkdirs();
if (result) {
Log.i("++ Created the Directory: " + path);
} else {
Log.w("-- Creating the Directory is failed: " + path);
}
return "";
}
return path;
}
示例5: clearCashedApplicationData
import ua.at.tsvetkov.util.Log; //導入方法依賴的package包/類
/**
* Call this method to delete any cache created by app
*/
public static void clearCashedApplicationData(@NonNull Context context) {
File cache = context.getCacheDir();
File appDir = new File(cache.getParent());
if (appDir.exists()) {
String[] children = appDir.list();
for (String s : children) {
File f = new File(appDir, s);
if (deleteDir(f)) {
Log.i(String.format("**************** DELETED -> (%s) *******************", f.getAbsolutePath()));
}
}
}
}
示例6: onFinish
import ua.at.tsvetkov.util.Log; //導入方法依賴的package包/類
@Override
public void onFinish(MonarchArray items, int what) {
acMainProgressLayout.setVisibility(View.GONE);
if (what == HttpStatus.SC_OK) {
adapter.init(items);
Log.i("MONARCH LOADED");
} else {
Log.e("Error, What=" + what);
}
}
示例7: clear
import ua.at.tsvetkov.util.Log; //導入方法依賴的package包/類
/**
* Clear the SharedPreferences
*/
public static void clear() {
mEditor.clear();
mEditor.commit();
Log.i(">>> Shared mPreferences was CLEARED! <<<");
}