APISonar


android.util.Log.ERROR

> android > util > Log > ERROR
android APIs util APIs Log APIs ERROR APIs

Example 1
public void e(Exception ex) {
		if (debug) {
			if (logLevel <= Log.ERROR) {
				Log.e(tag, "error", ex);
			}
		}
	}
Example 2
public static void eTag(String tag, String msg, Throwable t) {
        if (enableLog(Log.ERROR)) {
            sILogger.log(Log.ERROR, tag, msg, t);
        }
    }
Example 3
public void e(Throwable t) {
        if (t == null) {
            t = new Exception("null exception logged");
        }
        println(Log.ERROR, t.getMessage(), t);
    }
Example 4
public void error(Object str) {
        if (logLevel <= Log.ERROR) {            
            String name = getFunctionName();
            String ls=(name==null?str.toString():(name+" - "+str));
            Log.e(tag, ls);
        }
	}
Example 5
private boolean execute(Runnable task) {
        try {
            executorServiceImpl.execute(task);
            return true;
        } catch (Throwable e) {
            SonicUtils.log(TAG, Log.ERROR, "execute task error:" + e.getMessage());
            return false;
        }
    }
Example 6
public int e(Object s1, Object... args) {
        if( getLoggingLevel()> Log.ERROR )
            return 0;

        final String s = Strings.toString(s1);
        final String message = formatArgs(s, args);
        return println(Log.ERROR, message);
    }
Example 7
public static void printStackTrace() {
        if (isEnable) {
            try {
                StackTraceElement[] sts = Thread.currentThread().getStackTrace();
                for (StackTraceElement stackTraceElement : sts) {
                    DEFAULT_LOGHANDLER.publish("Log_StackTrace", Log.ERROR, stackTraceElement.toString());
                }
            } catch (Exception exception) {
                exception.printStackTrace();
            }
        }
    }
Example 8
public static void e(Throwable tr, String... msg) {
        if (ADB && LOG_DEGREE <= Log.ERROR) {
        	getMethodNames(new Throwable().getStackTrace());
        	String msgStr = createLog(msg);
        	
            Log.e(className, msgStr, tr);
            
            writeLogToFile(Log.ERROR, className, msgStr, tr);

        }
    }
Example 9
public static boolean saveResourceFiles(String resourceName, byte[] resourceBytes, Map<String, List<String>> headers) {
        if (resourceBytes != null && !SonicFileUtils.writeFile(resourceBytes, SonicFileUtils.getSonicResourcePath(resourceName))) {
            log(TAG, Log.ERROR, "saveResourceFiles error: write resource data fail.");
            return false;
        }

        if (headers != null && headers.size() > 0
                &&!SonicFileUtils.writeFile(SonicFileUtils.convertHeadersToString(headers), SonicFileUtils.getSonicResourceHeaderPath(resourceName))) {
            log(TAG, Log.ERROR, "saveResourceFiles error: write header file fail.");
            return false;
        }
        return true;
    }
Example 10
public void e(final Throwable t, final String format, final Object... args) {
    if (isLoggable(Log.ERROR)) {
      Log.e(tag, toMessage(format, args), t);
    }
  }
Example 11
public void setResult(Object result) {
		if (result instanceof Throwable) {
			Util.log(null, Log.ERROR, "Set result throwable=" + result);
			setThrowable((Throwable) result);
		} else {
			mResult = result;
			mHasResult = true;
		}
	}
Example 12
public static void e(String format, Object... args) {
        if (Log.ERROR >= sLevel) {
            Log.e(sTag, buildMsg(String.format(format, args)));
        }
    }
Example 13
public static void e(Object obj) {
        if (Log.ERROR > DEBUG_LEVEL) {
            String tag = getClassName();
            String msg = obj != null ? obj.toString() : "obj == null";
            Log.e(tag, msg);
        }
    }
Example 14
private boolean isSessionAvailable(String sessionId) {
        long unavailableTime = SonicDataHelper.getLastSonicUnavailableTime(sessionId);
        if (System.currentTimeMillis() > unavailableTime) {
            return true;
        }
        if (runtime.shouldLog(Log.ERROR)) {
            runtime.log(TAG, Log.ERROR, "sessionId(" + sessionId + ") is unavailable and unavailable time until " + unavailableTime + ".");
        }
        return false;
    }
Example 15
public void e(Throwable throwable, String message, Object... args) {
    if (throwable != null && message != null) {
      message += " : " + throwable.toString();
    }
    if (throwable != null && message == null) {
      message = throwable.toString();
    }
    if (message == null) {
      message = "No message/exception is set";
    }
    log(Log.ERROR, message, args);
  }
Example 16
private void startServer() {
        try {
            Thread socketServerThread = new Thread(new SocketServerThread());
            socketServerThread.start();
        } catch (Throwable e) {
            // Make sure an exception doesn't cause the rest of the user's
            // onCreate() method to be invoked
            if (Log.isLoggable(Logging.LOG_TAG, Log.ERROR)) {
                Log.e(Logging.LOG_TAG, "Fatal error starting Instant Run server", e);
            }
        }
    }
Example 17
public static List<PRestriction> getUsageList(Context context, int uid, String restrictionName) {
		checkCaller();

		List<PRestriction> listUsage = new ArrayList<PRestriction>();
		try {
			listUsage.addAll(PrivacyService.getClient().getUsageList(uid,
					restrictionName == null ? "" : restrictionName));
		} catch (Throwable ex) {
			Util.log(null, Log.ERROR, "getUsageList");
			Util.bug(null, ex);
		}
		Collections.sort(listUsage, new ParcelableRestrictionCompare());
		return listUsage;
	}
Example 18
public void loge(String message) {
        if (LOGTAG == null)
            return;
        if (logLevel > Log.ERROR)
            return;
        Log.e(LOGTAG, getLogMessage(message));
    }
Example 19
public void setEvents(List<ArrayList<Event>> sortedEvents) {
        mEvents = sortedEvents;
        if (sortedEvents == null) {
            return;
        }
        if (sortedEvents.size() != mNumDays) {
            if (Log.isLoggable(TAG, Log.ERROR)) {
                Log.wtf(TAG, "Events size must be same as days displayed: size="
                        + sortedEvents.size() + " days=" + mNumDays);
            }
            mEvents = null;
            return;
        }
    }
Example 20
public void onClose(boolean readComplete, ByteArrayOutputStream outputStream) {
        if (TextUtils.isEmpty(serverRsp) && readComplete && outputStream != null) {
            try {
                serverRsp = outputStream.toString(session.getCharsetFromHeaders());
                outputStream.close();
            } catch (Throwable e) {
                SonicUtils.log(TAG, Log.ERROR, "session(" + session.sId + "), onClose error:" + e.getMessage() + ".");
            }
        }
        session.onServerClosed(this, readComplete);
    }
Example 21
public static String getVersion() {
		String packageName = Globals.getContext().getPackageName();
		try {
			return Globals.getContext().getPackageManager().getPackageInfo(packageName, 0).versionName;
		} catch ( NameNotFoundException e) {
			myLog.l(Log.ERROR, "NameNotFoundException looking up SwiFTP version");
			return null;
		}
	}
Example 22
public boolean sendViaDataSocket(String string) {
        try {
            byte[] bytes = string.getBytes(encoding);
            myLog.d("Using data connection encoding: " + encoding);
            return sendViaDataSocket(bytes, bytes.length);
        } catch (UnsupportedEncodingException e) {
            myLog.l(Log.ERROR, "Unsupported encoding for data socket send");
            return false;
        }
    }
Example 23
private void onAutopilotError(int logLevel, CharSequence errorMsg) {
        if (TextUtils.isEmpty(errorMsg))
            return;

        switch (logLevel) {
            case Log.ERROR:
            case Log.WARN:
                handler.removeCallbacks(hideWarningViewCb);

                warningText.setText(errorMsg);
                warningContainer.setVisibility(View.VISIBLE);
                handler.postDelayed(hideWarningViewCb, WARNING_VIEW_DISPLAY_TIMEOUT);
                break;
        }
    }
Example 24
public static void e(String message) {
        if (!DEVELOP_MODE || TextUtils.isEmpty(message)) {
            return;
        }
        final StackTraceElement[] stack = new Throwable().getStackTrace();
        final int i = 1;
        final StackTraceElement ste = stack[i];
        Log.println(Log.ERROR, LOG_TAG, String.format("[%s][%s][%s]%s", ste.getFileName(), ste.getMethodName(), ste.getLineNumber(), message));
    }
Example 25
public void applyOptions(Context context, GlideBuilder builder) {
    builder.setLogLevel(Log.ERROR);
//    builder.setDiskCache(new NoopDiskCacheFactory());
  }