code: public static String print(int priority, String tag, String msg, Throwable tr, boolean addTimestamp) {
          // Compute the letter for the given priority
          String p = "X"; // X => Unknown
          switch (priority) {
              case Constants.DEBUG:
                  p = "D";
                  break;
              case Constants.INFO:
                  p = "I";
                  break;
              case Constants.WARN:
                  p = "W";
                  break;
              case Constants.ERROR:
                  p = "E";
                  break;
              case Constants.ASSERT:
                  p = "F";
                  break;
          }
          CharSequence timestamp = addTimestamp ? new SimpleDateFormat(TIMESTAMP_PATTERN).format(new Date()) : "";
          String base = p + "/" + timestamp + tag + ": " + msg;
          return tr == null ? base : base + "\n" + getStackTraceString(tr);
      }
docs: Gets a String form of the log data.
  
  @param priority
  The priority/type of this log message
  @param tag
  Used to identify the source of a log message. It usually
  identifies the class or activity where the log call occurs.
  @param msg
  The message you would like logged.
  @param tr
  The error, can be <code>null</code>
  @param addTimestamp
  <code>true</code> to add a timestamp to the returned string, <code>false</code> otherwise
  @return The String form.