Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c6958aa6 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Added new dump method with indent for LocalLog."

parents de41450f 694d29e8
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -60,9 +60,19 @@ public final class LocalLog {
    }

    public synchronized void dump(PrintWriter pw) {
        dump("", pw);
    }

    /**
     * Dumps the content of local log to print writer with each log entry predeced with indent
     *
     * @param indent indent that precedes each log entry
     * @param pw printer writer to write into
     */
    public synchronized void dump(String indent, PrintWriter pw) {
        Iterator<String> itr = mLog.iterator();
        while (itr.hasNext()) {
            pw.println(itr.next());
            pw.printf("%s%s\n", indent, itr.next());
        }
    }