Package org.eclipse.jetty.util.log

Examples of org.eclipse.jetty.util.log.Slf4jLog


    }

    @Override
    protected synchronized void doStart() throws Exception
    {
        logger = new Slf4jLog(loggerName);
        super.doStart();
    }
View Full Code Here


        run(options.isJointServerThread());
    }

    public void run(boolean join) throws Exception {
        System.setProperty("org.eclipse.jetty.util.log.class", Slf4jLog.class.getName());
        Slf4jLog log = new Slf4jLog("jetty");
        Log.setLog(log);

        WebAppContext webapp = new WebAppContext();
        webapp.setContextPath(options.getContextPath());

        String war = findWar(options.getWarLocation());
        if (war == null) {
            war = options.getWar();
        }
        if (war == null) {
            throw new IllegalArgumentException("No war or warLocation options set!");
        }
        webapp.setWar(war);
        webapp.setParentLoaderPriority(true);
        webapp.setLogUrlOnStart(true);
        webapp.setExtraClasspath(options.getExtraClassPath());

        // lets set a temporary directory so jetty doesn't bork if some process zaps /tmp/*
        String homeDir = System.getProperty("user.home", ".") + System.getProperty("hawtio.dirname", "/.hawtio");
        String tempDirPath = homeDir + "/tmp";
        File tempDir = new File(tempDirPath);
        tempDir.mkdirs();
        log.info("using temp directory for jetty: " + tempDir.getPath());
        webapp.setTempDirectory(tempDir);

        Server server = new Server(options.getPort());
        server.setHandler(webapp);

View Full Code Here

    bindInterface = aBindInterface;
  }

  public void start() throws Exception {
    // Setting Slf4j for logging
    Log.setLog(new Slf4jLog());
   
    server = new Server(createThreadPool());

    server.addConnector(createConnector(server));
    server.setHandler(createHandlers());
View Full Code Here

    private static final transient Logger LOG = LoggerFactory.getLogger(Main.class);

    public static void main(String[] args) {
        try {
            System.setProperty("org.eclipse.jetty.util.log.class", Slf4jLog.class.getName());
            Log.setLog(new Slf4jLog("jetty"));
            int port = Integer.parseInt(System.getProperty("jettyPort", "8080"));
            String contextPath = System.getProperty("context", "/hawtio");
            if (!contextPath.startsWith("/")) {
                contextPath = "/" + contextPath;
            }
View Full Code Here

TOP

Related Classes of org.eclipse.jetty.util.log.Slf4jLog

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.