Changeset bbcd6243


Ignore:
Timestamp:
Dec 23, 2011 1:23:12 AM (8 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
36cb07b0, ebad5ad
Parents:
95eabfa
Message:
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/util/LogManager.java

    r95eabfa rbbcd6243  
    261261    /**
    262262     * Called periodically by the log writer's thread
    263      *
     263     * Do not log here, deadlock of LogWriter
    264264     */
    265265    void rereadConfig() {
    266266        // perhaps check modification time
    267         if (_log.shouldLog(Log.DEBUG))
    268             _log.debug("Rereading configuration file");
     267        //if (_log.shouldLog(Log.DEBUG))
     268        //    _log.debug("Rereading configuration file");
    269269        loadConfig();
    270270    }
    271271
     272    /**
     273     * Do not log here, deadlock of LogWriter via rereadConfig().
     274     */
    272275    private void loadConfig() {
    273276        File cfgFile = _locationFile;
    274277        if (!cfgFile.exists()) {
    275278            if (!_alreadyNoticedMissingConfig) {
    276                 if (_log.shouldLog(Log.WARN))
    277                     _log.warn("Log file " + _locationFile.getAbsolutePath() + " does not exist");
     279                //if (_log.shouldLog(Log.WARN))
     280                //    _log.warn("Log file " + _locationFile.getAbsolutePath() + " does not exist");
    278281                _alreadyNoticedMissingConfig = true;
    279282            }
     
    285288       
    286289        if ((_configLastRead > 0) && (_configLastRead >= cfgFile.lastModified())) {
    287             if (_log.shouldLog(Log.INFO))
    288                 _log.info("Short circuiting config read (last read: "
    289                            + (_context.clock().now() - _configLastRead) + "ms ago, config file modified "
    290                            + (_context.clock().now() - cfgFile.lastModified()) + "ms ago");
     290            //if (_log.shouldLog(Log.INFO))
     291            //    _log.info("Short circuiting config read (last read: "
     292            //               + (_context.clock().now() - _configLastRead) + "ms ago, config file modified "
     293            //               + (_context.clock().now() - cfgFile.lastModified()) + "ms ago");
    291294            return;
    292295        }
     
    303306    }
    304307
     308    /**
     309     * Do not log here, deadlock of LogWriter via rereadConfig().
     310     */
    305311    private void parseConfig(Properties config) {
    306312        String fmt = config.getProperty(PROP_FORMAT, DEFAULT_FORMAT);
     
    354360        }
    355361
    356         if (_log.shouldLog(Log.DEBUG))
    357             _log.debug("Log set to use the base log file as " + _baseLogfilename);
     362        //if (_log.shouldLog(Log.DEBUG))
     363        //    _log.debug("Log set to use the base log file as " + _baseLogfilename);
    358364       
    359365        parseLimits(config);
    360366    }
    361367
     368    /**
     369     * Do not log here, deadlock of LogWriter via rereadConfig().
     370     */
    362371    private void parseLimits(Properties config) {
    363372        parseLimits(config, PROP_RECORD_PREFIX);
    364373    }
    365374
     375    /**
     376     * Do not log here, deadlock of LogWriter via rereadConfig().
     377     */
    366378    private void parseLimits(Properties config, String recordPrefix) {
    367379        _limits.clear();
     
    401413    /**
    402414     * Update the date format
     415     * Do not log here, deadlock of LogWriter via rereadConfig().
    403416     *
    404417     * @param format null or empty string means use default format for the locale
     
    424437            return true;
    425438        } catch (IllegalArgumentException iae) {
    426             getLog(LogManager.class).error("Date format is invalid [" + format + "]", iae);
     439            //getLog(LogManager.class).error("Date format is invalid [" + format + "]", iae);
    427440            return false;
    428441        }
     
    497510    }
    498511
     512    /**
     513     * Do not log here, deadlock of LogWriter via rereadConfig().
     514     */
    499515    private void updateLimits() {
    500516        for (Log log : _logs.values()) {
     
    503519    }
    504520
     521    /**
     522     * Do not log here, deadlock of LogWriter via rereadConfig().
     523     */
    505524    private void updateLimit(Log log) {
    506525        List<LogLimit> limits = getLimits(log);
     
    528547    }
    529548
    530     /** @return null if no matches */
     549    /**
     550     * Do not log here, deadlock of LogWriter via rereadConfig().
     551     * @return null if no matches
     552     */
    531553    private List<LogLimit> getLimits(Log log) {
    532554        ArrayList<LogLimit> limits = null; // new ArrayList(4);
  • history.txt

    r95eabfa rbbcd6243  
     12011-12-23 zzz
     2  * Logging: Eliminate LogWriter/LogManager deadlock
     3
    142011-12-18 zzz
    25  * Addresses: Add utility toString() methods
  • router/java/src/net/i2p/router/RouterVersion.java

    r95eabfa rbbcd6243  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 24;
     21    public final static long BUILD = 25;
    2222
    2323    /** for example "-test" */
Note: See TracChangeset for help on using the changeset viewer.