Changeset beb6d1f4


Ignore:
Timestamp:
Dec 31, 2011 12:49:39 AM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
b5f97d0
Parents:
c0662bc
Message:

I2PLogger fix; better log init

Location:
apps
Files:
2 edited

Legend:

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

    rc0662bc rbeb6d1f4  
    3333   
    3434    StringBuilder _buffer = new StringBuilder();
     35   
     36    public I2PLogger()
     37    {
     38        this(I2PAppContext.getGlobalContext());
     39    }
    3540   
    3641    public I2PLogger(I2PAppContext ctx)
     
    106111    private void format(String msg, Object arg0, Object arg1)
    107112    {
     113        _buffer.setLength(0);
    108114        int i0=msg==null?-1:msg.indexOf("{}");
    109115        int i1=i0<0?-1:msg.indexOf("{}",i0+2);
  • apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java

    rc0662bc rbeb6d1f4  
    222222            System.err.println("ERROR: Unable to create Jetty temporary work directory");
    223223       
    224         try {
    225             Log.setLog(new I2PLogger(I2PAppContext.getGlobalContext()));
    226         } catch (Throwable t) {
    227             System.err.println("INFO: I2P Jetty logging class not found, logging to wrapper log");
    228         }
     224        //try {
     225        //    Log.setLog(new I2PLogger(I2PAppContext.getGlobalContext()));
     226        //} catch (Throwable t) {
     227        //    System.err.println("INFO: I2P Jetty logging class not found, logging to wrapper log");
     228        //}
     229        // This way it doesn't try to load Slf4jLog first
     230        System.setProperty("org.mortbay.log.class", "net.i2p.jetty.I2PLogger");
     231
    229232        // so Jetty can find WebAppConfiguration
    230233        System.setProperty("jetty.class.path", I2PAppContext.getGlobalContext().getBaseDir() + "/lib/routerconsole.jar");
Note: See TracChangeset for help on using the changeset viewer.