當前位置: 首頁>>代碼示例>>Java>>正文


Java Log.i方法代碼示例

本文整理匯總了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...");
   }
}
 
開發者ID:lordtao,項目名稱:android-tao-core,代碼行數:21,代碼來源:AppConfig.java

示例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("=================================================");
   }
}
 
開發者ID:lordtao,項目名稱:android-tao-rest-data-processor,代碼行數:29,代碼來源:DataProcessorConfiguration.java

示例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;
}
 
開發者ID:lordtao,項目名稱:android-tao-core,代碼行數:14,代碼來源:FieldsValidator.java

示例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;
}
 
開發者ID:lordtao,項目名稱:android-tao-core,代碼行數:21,代碼來源:FileIO.java

示例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()));
         }
      }
   }
}
 
開發者ID:lordtao,項目名稱:android-tao-core,代碼行數:17,代碼來源:FileIO.java

示例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);
   }
}
 
開發者ID:lordtao,項目名稱:android-tao-data-processor-example,代碼行數:11,代碼來源:AcMain.java

示例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! <<<");
}
 
開發者ID:lordtao,項目名稱:android-tao-core,代碼行數:9,代碼來源:AppConfig.java


注:本文中的ua.at.tsvetkov.util.Log.i方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。