Android Open Source - ILog I Log Console






From Project

Back to project page ILog.

License

The source code is released under:

GNU General Public License

If you think the Android project ILog listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.moshx.ilog.console;
// w  ww.ja  v a 2  s  .  com
public abstract class ILogConsole {

  public abstract void d(String tag, Object msg, Throwable err);

  public abstract void e(String tag, Object msg, Throwable err);

  public abstract void i(String tag, Object msg, Throwable err);

  public abstract void v(String tag, Object msg, Throwable err);

  public abstract void w(String tag, Object msg, Throwable err);

  protected static boolean isEmpty(Object s) {
    return s == null || s.toString().length() == 0;
  }

  protected static String[] splitStringByLimit(String s, int limit) {
    int length = s.length();
    int count = length / 4000 + (length % 4000 > 0 ? 1 : 0);
    String[] msgs = new String[count];
    int index = 0;
    for (int i = 0; i < msgs.length; i++) {
      int r = index + 4000;
      if (r > length) {
        r = length;
      }
      msgs[i] = s.substring(index, r);
      index += 4000;
    }

    return msgs;
  }
}




Java Source Code List

com.moshx.ilog.ILog.java
com.moshx.ilog.Settings.java
com.moshx.ilog.console.AndroidConsole.java
com.moshx.ilog.console.ConsoleFactory.java
com.moshx.ilog.console.ILogConsole.java
com.moshx.ilog.console.JVMConsole.java
com.moshx.ilog.filelogger.FileLogger.java
com.moshx.ilog.filelogger.HtmlFileLogger.java
com.moshx.ilog.filelogger.TextFileLogger.java
com.moshx.ilog.utils.Utility.java
com.moshx.ilogsample.MainActivity.java
com.moshx.jvmsample.LoggingTest.java