Changeset 57b794f


Ignore:
Timestamp:
Apr 14, 2013 2:02:43 PM (7 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
e29bb5b
Parents:
8bfe3f6
Message:
  • Jetty logging: Fix logging using I2PLogger class; log ignored messages at debug level
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • apps/jetty/java/src/net/i2p/jetty/I2PLogger.java

    r8bfe3f6 r57b794f  
    188188    public void ignore(Throwable ignored)
    189189    {
    190             warn("IGNORED", ignored);
     190            debug("IGNORED", ignored);
    191191    }
    192192   
  • apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java

    r8bfe3f6 r57b794f  
    3030import net.i2p.data.Base32;
    3131import net.i2p.data.DataHelper;
     32import net.i2p.jetty.I2PLogger;
    3233import net.i2p.router.RouterContext;
    3334import net.i2p.router.update.ConsoleUpdateManager;
     
    6465import org.eclipse.jetty.servlet.ServletHolder;
    6566import org.eclipse.jetty.webapp.WebAppContext;
     67import org.eclipse.jetty.util.log.Log;
    6668import org.eclipse.jetty.util.resource.Resource;
    6769import org.eclipse.jetty.util.security.Constraint;
     
    7678 */
    7779public class RouterConsoleRunner implements RouterApp {
     80       
     81    static {
     82        // To take effect, must be set before any Jetty classes are loaded
     83        try {
     84            Log.setLog(new I2PLogger());
     85        } catch (Throwable t) {
     86            System.err.println("INFO: I2P Jetty logging class not found, logging to wrapper log");
     87        }
     88        // This way it doesn't try to load Slf4jLog first
     89        // This causes an NPE in AbstractLifeCycle
     90        // http://dev.eclipse.org/mhonarc/lists/jetty-users/msg02587.html
     91        //System.setProperty("org.eclipse.jetty.util.log.class", "net.i2p.jetty.I2PLogger");
     92    }
     93
    7894    private final RouterContext _context;
    7995    private final ClientAppManager _mgr;
     
    291307        if (!workDirCreated)
    292308            System.err.println("ERROR: Unable to create Jetty temporary work directory");
    293        
    294         //try {
    295         //    Log.setLog(new I2PLogger(_context));
    296         //} catch (Throwable t) {
    297         //    System.err.println("INFO: I2P Jetty logging class not found, logging to wrapper log");
    298         //}
    299         // This way it doesn't try to load Slf4jLog first
    300         System.setProperty("org.eclipse.jetty.util.log.class", "net.i2p.jetty.I2PLogger");
    301309
    302310        // so Jetty can find WebAppConfiguration
  • history.txt

    r8bfe3f6 r57b794f  
     12013-04-14 zzz
     2 * i2psnark:
     3   - Set unique tunnel nickname for additional instances
     4   - Increase page size to 50
     5 * Jetty logging: Fix logging using I2PLogger class;
     6   log ignored messages at debug level
     7
    182013-04-13 zzz
    29 * Console: Add /graph support for bw.combined, consolidate
  • installer/resources/eepsite/jetty.xml

    r8bfe3f6 r57b794f  
    2626<!--                                                                           -->
    2727<!-- Jetty now uses the I2P logging system rather than wrapper.log.            -->
    28 <!-- Use the log override org.mortbay.jetty.Server to adjust the log level.    -->
     28<!-- Use the log override org.eclipse.jetty.server.Server to adjust the log level.  -->
    2929<!--                                                                           -->
    3030<!-- Note that the XML encoding for this file is UTF-8.                        -->
  • router/java/src/net/i2p/router/RouterVersion.java

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