Changeset d5edcbc


Ignore:
Timestamp:
Aug 13, 2014 9:29:17 PM (6 years ago)
Author:
dg2-new <dg2-new@…>
Branches:
master
Children:
3839c8d1
Parents:
eb97ef4
Message:
  • Console, EventLog?: Added {BECAME,NOT}_FLOODFILL events. They will now be shown on the console's /events page when the router's ff status changes.
  • EventLog?: Fix a minor typo.
Files:
4 edited

Legend:

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

    reb97ef4 rd5edcbc  
    3333    private static final String[] _events = new String[] {
    3434        EventLog.ABORTED, _x("Aborted startup"),
     35        EventLog.BECAME_FLOODFILL, _x("Enabled floodfill"),
    3536        EventLog.CHANGE_IP, _x("Changed IP"),
    3637        EventLog.CHANGE_PORT, _x("Changed port"),
     
    4243        EventLog.NETWORK, _x("Network error"),
    4344        EventLog.NEW_IDENT, _x("New router identity"),
     45        EventLog.NOT_FLOODFILL, _x("Disabled floodfill"),
    4446        EventLog.OOM, _x("Out of memory error"),
    4547        EventLog.REKEYED, _x("New router identity"),
  • history.txt

    reb97ef4 rd5edcbc  
    1 2014-08-13 zzz
     12014-08-13 zzz, dg
    22 * Console: Escaping fix (ticket #1346)
    33 * i2psnark: Fix add torrent NPE
     4 * Console, EventLog: add BECAME_FLOODFILL and NOT_FLOODFILL, they are now shown at the /events page when the router changes its floodfill state
    45
    562014-08-10 zzz
  • router/java/src/net/i2p/router/networkdb/kademlia/FloodfillMonitorJob.java

    reb97ef4 rd5edcbc  
    1010import net.i2p.router.RouterContext;
    1111import net.i2p.router.peermanager.PeerProfile;
     12import net.i2p.router.util.EventLog;
    1213import net.i2p.util.Log;
    1314
     
    4344        boolean ff = shouldBeFloodfill();
    4445        _facade.setFloodfillEnabled(ff);
    45         if (ff != wasFF)
     46        if (ff != wasFF) {
     47                        if(ff) {
     48                                getContext().router().eventLog().addEvent(EventLog.BECAME_FLOODFILL);
     49                        } else {
     50                                getContext().router().eventLog().addEvent(EventLog.NOT_FLOODFILL);
     51                        }
    4652            getContext().router().rebuildRouterInfo();
     53        }
    4754        if (_log.shouldLog(Log.INFO))
    4855            _log.info("Should we be floodfill? " + ff);
  • router/java/src/net/i2p/router/util/EventLog.java

    reb97ef4 rd5edcbc  
    3333    /** for convenience, not required */
    3434    public static final String ABORTED = "aborted";
     35    public static final String BECAME_FLOODFILL = "becameFloodfill";
    3536    public static final String CHANGE_IP = "changeIP";
    3637    public static final String CHANGE_PORT = "changePort";
     
    3940    public static final String CRITICAL = "critical";
    4041    public static final String INSTALLED = "installed";
    41     public static final String INSTALL_FAILED = "intallFailed";
     42    public static final String INSTALL_FAILED = "installFailed";
    4243    public static final String NETWORK = "network";
    4344    public static final String NEW_IDENT = "newIdent";
     45    public static final String NOT_FLOODFILL = "disabledFloodfill";
    4446    public static final String OOM = "oom";
    4547    public static final String REKEYED = "rekeyed";
Note: See TracChangeset for help on using the changeset viewer.