Changeset b76b2ef for apps


Ignore:
Timestamp:
Feb 23, 2019 6:02:00 PM (16 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
7ce539a
Parents:
32797dd4
Message:

Console: Flip order of router logs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/web/helpers/LogsHelper.java

    r32797dd4 rb76b2ef  
    115115    }
    116116   
    117     /*****  unused
    118     public String getConnectionLogs() {
    119         return formatMessages(_context.commSystem().getMostRecentErrorMessages());
    120     }
    121     ******/
    122 
    123117    private final static String NL = System.getProperty("line.separator");
    124118
    125     /** formats in reverse order */
     119    /** formats in forward order */
    126120    private String formatMessages(List<String> msgs) {
    127121        if (msgs.isEmpty())
     
    130124        StringBuilder buf = new StringBuilder(16*1024);
    131125        buf.append("</td></tr><tr><td><ul>");
    132         for (int i = msgs.size() - 1; i >= 0; i--) {
     126        // newest first
     127        // for (int i = msgs.size() - 1; i >= 0; i--) {
     128        // oldest first
     129        for (int i = 0; i < msgs.size(); i++) {
    133130            String msg = msgs.get(i);
    134131            // don't display the dup message if it is last
    135             if (i == 0 && msg.contains("&darr;"))
     132            //if (i == 0 && msg.contains("&darr;"))
     133            // don't display the dup message if it is first
     134            if (i == 0 && msg.contains("&uarr;"))
    136135                break;
    137136            msg = msg.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;");
    138             msg = msg.replace("&amp;darr;", "&darr;");  // hack - undo the damage (LogWriter)
     137            //msg = msg.replace("&amp;darr;", "&darr;");  // hack - undo the damage (LogWriter)
     138            msg = msg.replace("&amp;uarr;", "&uarr;");  // hack - undo the damage (LogWriter)
    139139            // remove  last \n that LogRecordFormatter added
    140140            if (msg.endsWith(NL))
Note: See TracChangeset for help on using the changeset viewer.