Package org.apache.felix.framework

Examples of org.apache.felix.framework.Logger


            // Display port number on console, in case HttpService doesn't
            getLog().info("HTTP server port: " + httpPort);
            props.put(PROP_PORT, String.valueOf(httpPort));

            // prevent tons of needless WARN from the framework
            Logger logger = new Logger();
            logger.setLogLevel(Logger.LOG_ERROR);

            if (propertiesFile.exists()) {
                File tmp = null;
                try {
                    tmp = File.createTempFile("sling", "props");
View Full Code Here


                    }
                }
            }
        };

        Logger logger = new Logger();
        ServiceRegistry registry = new ServiceRegistry(logger, null);
        registry.registerService(b4.getBundleContext(), new String [] {EventHook.class.getName()}, eh1, new Hashtable());
        registry.registerService(b4.getBundleContext(), new String [] {EventHook.class.getName()}, eh2, new Hashtable());

        // -- Set up event dispatcher
View Full Code Here

        } else {
            logLevel = toLogLevelInt(commandLine.get(PROP_LOG_LEVEL),
                DEFAULT_LOG_LEVEL);
            commandLine.put(LOG_LEVEL_PROP, String.valueOf(logLevel));
        }
        final Logger logger = new SlingLogger();

        // Display port number on console, in case HttpService doesn't
        info("HTTP server port: " + commandLine.get(PROP_PORT), null);

        // default log level: prevent tons of needless WARN from the framework
        logger.setLogLevel(Logger.LOG_ERROR);
        if ( System.getProperty(PROP_BOOT_LOG_LEVEL) != null ) {
            try {
                logger.setLogLevel(
                    Integer.parseInt(System.getProperty(PROP_BOOT_LOG_LEVEL)));
            } catch (final NumberFormatException ex) {
                // just ignore
            }
        }
View Full Code Here

            log("Starting Apache Sling in " + slingHome);

            // read the default parameters
            Map<String, String> props = loadConfigProperties(slingHome);

            Logger logger = new ServletContextLogger(getServletContext());
            LaunchpadContentProvider rp = new ServletContextResourceProvider(
                getServletContext());
            tmpSling = new SlingBridge(notifiable, logger, rp, props, getServletContext());

            // set up the OSGi HttpService proxy servlet
View Full Code Here

            final Map<String, String> properties = new HashMap<String, String>();
            properties.put(SharedConstants.SLING_HOME, tmpDirName);
            properties.put(Constants.FRAMEWORK_STORAGE, tmpDirName);
            properties.put(Constants.FRAMEWORK_BEGINNING_STARTLEVEL, "42");
           
            final Logger logger = new Logger();
            startupManager = new StartupManager(properties, logger);
        } finally {
            tmpFile.delete();
        }
    }
View Full Code Here

        // read the default parameters
        Map<String, String> props = loadConfigProperties();

        try {
            Logger logger = new ServletContextLogger(getServletContext());
            ResourceProvider rp = new ServletContextResourceProvider(
                getServletContext());
            sling = new SlingBridge(logger, rp, props);
        } catch (Exception ex) {
            log("Cannot start the OSGi framework", ex);
View Full Code Here

        } else {
            logLevel = toLogLevelInt(commandLine.get(PROP_LOG_LEVEL),
                DEFAULT_LOG_LEVEL);
            commandLine.put(LOG_LEVEL_PROP, String.valueOf(logLevel));
        }
        Logger logger = new Logger();

        // prevent tons of needless WARN from the framework
        // logger.setLogLevel(logLevel);
        logger.setLogLevel(Logger.LOG_ERROR);

        // prevent tons of needless WARN messages from the framework
        // logger.setLogLevel(logLevel);
        logger.setLogLevel(Logger.LOG_ERROR);

        try {
            ResourceProvider resProvider = new ClassLoaderResourceProvider(
                Main.class.getClassLoader());
            Sling sling = new Sling(logger, resProvider, props) {
View Full Code Here

        m_config = config;
        m_reporter = (reporter == null) ? new DummyReporter() : reporter;
        m_bundles = new ConcurrentHashMap<Long, VerifierBundleRevision>();
       
        m_log = new Logger();
        m_log.setLogger(new FrameworkLogger(m_reporter));
        m_log.setLogLevel(Logger.LOG_DEBUG);
    }
View Full Code Here

        } else {
            logLevel = toLogLevelInt(commandLine.get(PROP_LOG_LEVEL),
                DEFAULT_LOG_LEVEL);
            commandLine.put(LOG_LEVEL_PROP, String.valueOf(logLevel));
        }
        Logger logger = new Logger();

        // Display port number on console, in case HttpService doesn't
        info("HTTP server port: " + commandLine.get(PROP_PORT), null);

        // prevent tons of needless WARN from the framework
        logger.setLogLevel(Logger.LOG_ERROR);

        try {
            ResourceProvider resProvider = new ClassLoaderResourceProvider(
                MainDelegate.class.getClassLoader());
View Full Code Here

            log("Starting Sling in " + slingHome);

            // read the default parameters
            Map<String, String> props = loadConfigProperties(slingHome);

            Logger logger = new ServletContextLogger(getServletContext());
            ResourceProvider rp = new ServletContextResourceProvider(
                getServletContext());
            tmpSling = new SlingBridge(notifiable, logger, rp, props);

            // set up the OSGi HttpService proxy servlet
View Full Code Here

TOP

Related Classes of org.apache.felix.framework.Logger

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.