Changeset 5af6c97


Ignore:
Timestamp:
Mar 1, 2012 2:21:54 PM (8 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
cadedeb0
Parents:
cf41068
Message:

log tweaks, final

Location:
router/java/src/net/i2p/router/client
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/client/ClientConnectionRunner.java

    rcf41068 r5af6c97  
    240240   
    241241    /**
    242      *  Send a DisconnectMessage and log with level Log.CRIT.
     242     *  Send a DisconnectMessage and log with level Log.ERROR.
    243243     *  This is always bad.
    244244     *  See ClientMessageEventListener.handleCreateSession()
     
    246246     */
    247247    void disconnectClient(String reason) {
    248         disconnectClient(reason, Log.CRIT);
     248        disconnectClient(reason, Log.ERROR);
    249249    }
    250250
     
    255255    void disconnectClient(String reason, int logLevel) {
    256256        if (_log.shouldLog(logLevel))
    257             _log.log(logLevel, "Disconnecting the client ("
    258                      + _config
    259                      + ") : " + reason);
     257            _log.log(logLevel, "Disconnecting the client - "
     258                     + reason
     259                     + " config: "
     260                     + _config);
    260261        DisconnectMessage msg = new DisconnectMessage();
    261262        msg.setReason(reason);
  • router/java/src/net/i2p/router/client/RequestLeaseSetJob.java

    rcf41068 r5af6c97  
    2828 */
    2929class RequestLeaseSetJob extends JobImpl {
    30     private Log _log;
    31     private ClientConnectionRunner _runner;
    32     private LeaseSet _ls;
    33     private long _expiration;
    34     private Job _onCreate;
    35     private Job _onFail;
    36     private LeaseRequestState _requestState;
     30    private final Log _log;
     31    private final ClientConnectionRunner _runner;
     32    private final LeaseSet _ls;
     33    private final long _expiration;
     34    private final Job _onCreate;
     35    private final Job _onFail;
     36    private final LeaseRequestState _requestState;
    3737   
    3838    public RequestLeaseSetJob(RouterContext ctx, ClientConnectionRunner runner, LeaseSet set, long expiration, Job onCreate, Job onFail, LeaseRequestState state) {
     
    9393     */
    9494    private class CheckLeaseRequestStatus extends JobImpl {
    95         private LeaseRequestState _req;
    96         private long _start;
     95        private final LeaseRequestState _req;
     96        private final long _start;
    9797       
    9898        public CheckLeaseRequestStatus(RouterContext enclosingContext, LeaseRequestState state) {
     
    115115            } else {
    116116                RequestLeaseSetJob.CheckLeaseRequestStatus.this.getContext().statManager().addRateData("client.requestLeaseSetTimeout", 1, 0);
    117                 if (_log.shouldLog(Log.CRIT)) {
     117                if (_log.shouldLog(Log.ERROR)) {
    118118                    long waited = System.currentTimeMillis() - _start;
    119                     _log.log(Log.CRIT, "Failed to receive a leaseSet in the time allotted (" + waited + "): " + _req + " for "
     119                    _log.error("Failed to receive a leaseSet in the time allotted (" + waited + "): " + _req + " for "
    120120                             + _runner.getConfig().getDestination().calculateHash().toBase64());
    121121                }
Note: See TracChangeset for help on using the changeset viewer.