public static Trace fromString(String logcatTrace) throws IllegalTraceException {
    if (logcatTrace == null
        || logcatTrace.length() < MIN_TRACE_SIZE
        || logcatTrace.charAt(20) != TRACE_LEVEL_SEPARATOR) {
      throw new IllegalTraceException(
          "You are trying to create a Trace object from a invalid String. Your trace have to be "
              + "something like: '02-07 17:45:33.014 D/Any debug trace'.");
    }
    TraceLevel level = TraceLevel.getTraceLevel(logcatTrace.charAt(TRACE_LEVEL_INDEX));
    String date = logcatTrace.substring(0, END_OF_DATE_INDEX);
    String message = logcatTrace.substring(START_OF_MESSAGE_INDEX, logcatTrace.length());
    return new Trace(level, date + " " + message);
  }
Factory method used to create a Trace instance from a String. The format of the input string
have to be something like: "02-07 17:45:33.014 D/Any debug trace"

@param logcatTrace the logcat string
@return a new Trace instance
@throws IllegalTraceException if the string argument is an invalid string
lynx/src/main/java/com/github/pedrovgs/lynx/model/Trace.java