Examples of LoggingInfo


Examples of com.salesforce.ide.core.internal.utils.LoggingInfo

            private void handleLogCategoryChange(LogCategoryExt logCategoryExt) {
                // fchang: hook for display diff log category w/o requesting server again. - per bill: not possible
                // w/o refactoring server-side code.
                logLevelScale.setEnabled(true); // enable scale only after logCategory is set.
                LoggingInfo loggingInfo =
                        loggingService.getLoggingInfoByCategory(project, logCategoryExt, supportedFeatureEnum);
                setLoggingInfo(loggingInfo);
            }

            @Override
            public void widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent e) {}
        });

        // 3. Log level label
        CLabel logLevel = new CLabel(loggingComposite, SWT.NONE);
        logLevel.setText("Log level:   --");
        logLevel.setLayoutData(new GridData(SWT.BEGINNING));

        // 4. Log levels scale
        logLevelScale = new Scale(loggingComposite, SWT.NULL);
        logLevelScale.setIncrement(1);
        logLevelScale.setMaximum(7);
        logLevelScale.setEnabled(false);
        logLevelScale.setPageIncrement(1);
        logLevelScale.setLayoutData(new GridData(SWT.BEGINNING));
        logLevelScale.addListener(SWT.Selection, new Listener() {
            @Override
            public void handleEvent(Event event) {
                LoggingInfo loggingInfo =
                        LoggingInfo.getLoggingInfo(logLevelScale.getSelection(), logCategoryCombo.getText());
                loggingService.setLoggingInfo(project, loggingInfo, supportedFeatureEnum);
                logLevelDesc.setText(PLUS_PREFIX + loggingInfo.getLevelLabelText());
                layout(true, true);
            }
        });

        // 5. Log level description label
View Full Code Here

Examples of com.salesforce.ide.core.internal.utils.LoggingInfo

     * @return
     */
    public LoggingInfo getDefaultSelectedLoggingInfo(IProject project, SupportedFeatureEnum supportedFeatureEnum) {
        LogCategoryExt defaultSelectedCategory = LogCategoryExt.Apex_code;
        LogCategoryLevelExt level = getLogCategoryLevelExt(project, defaultSelectedCategory, supportedFeatureEnum);
        return new LoggingInfo(defaultSelectedCategory, level);
    }
View Full Code Here

Examples of com.salesforce.ide.core.internal.utils.LoggingInfo

     * @return
     */
    public LogInfo[] getAllLogInfo(IProject project, SupportedFeatureEnum supportedFeatureEnum) {
        List<LogInfo> logInfoList = new ArrayList<LogInfo>();
        for (int i = 0; i < LoggingInfo.getLogCategories().length; i++) {
            LoggingInfo loggingInfo =
                    getLoggingInfoByCategory(project, LoggingInfo.getLogCategories()[i], supportedFeatureEnum);
            if (loggingInfo.getLogInfo() != null) {
                logInfoList.add(loggingInfo.getLogInfo());
            }
        }
        return logInfoList.toArray(new LogInfo[logInfoList.size()]);
    }
View Full Code Here

Examples of com.salesforce.ide.core.internal.utils.LoggingInfo

    }

    public LoggingInfo[] getAllLoggingInfo(IProject project, SupportedFeatureEnum supportedFeatureEnum) {
        List<LoggingInfo> loggingInfoList = new ArrayList<LoggingInfo>();
        for (int i = 0; i < LoggingInfo.getLogCategories().length; i++) {
            LoggingInfo loggingInfo =
                    getLoggingInfoByCategory(project, LoggingInfo.getLogCategories()[i], supportedFeatureEnum);
            loggingInfoList.add(loggingInfo);
        }
        return loggingInfoList.toArray(new LoggingInfo[loggingInfoList.size()]);
    }
View Full Code Here

Examples of com.salesforce.ide.core.internal.utils.LoggingInfo

            levelyExt.getExternalValue());
    }

    public LoggingInfo getLoggingInfoByCategory(IProject project, LogCategoryExt logCategoryExt,
            SupportedFeatureEnum supportedFeatureEnum) {
        LoggingInfo loggingInfo =
                new LoggingInfo(logCategoryExt, getLogCategoryLevelExt(project, logCategoryExt, supportedFeatureEnum));
        return loggingInfo;
    }
View Full Code Here

Examples of org.geoserver.config.LoggingInfo

            }

        }

        // LOGGING
        LoggingInfo loggingInfo = geoserver.getLogging();
        if (loggingInfo == null) {
            LOGGER.warning("Missing logging info. Creating default.");
            loggingInfo = this.geoserver.getFactory().createLogging();
            geoserver.setLogging(loggingInfo);
        }
View Full Code Here

Examples of org.geoserver.config.LoggingInfo

        info.setJAI( jai );
        
        geoServer.setGlobal( info );
       
        //logging
        LoggingInfo logging = factory.createLogging();
       
        logging.setLevel( (String) global.get( "log4jConfigFile") );
        logging.setLocation( (String) global.get( "logLocation") );
       
        if ( global.get( "suppressStdOutLogging" ) != null ) {
            logging.setStdOutLogging( ! get( global, "suppressStdOutLogging", Boolean.class) );   
        }
        else {
            logging.setStdOutLogging(true);
        }
        geoServer.setLogging(logging);
       
        // read services
        for ( LegacyServiceLoader sl : GeoServerExtensions.extensions( LegacyServiceLoader.class ) ) {
View Full Code Here

Examples of org.geoserver.config.LoggingInfo

                File f= loader.find( "logging.xml" );
                if ( f != null ) {
                    XStreamPersister xp = new XStreamPersisterFactory().createXMLPersister();
                    BufferedInputStream in = new BufferedInputStream( new FileInputStream( f ) );
                    try {
                        LoggingInfo loginfo = xp.load(in,LoggingInfo.class);
                        LoggingUtils.initLogging(loader, loginfo.getLevel(), !loginfo.isStdOutLogging(),
                            loginfo.getLocation());
                    }
                    finally {
                        in.close();
                    }
                }
View Full Code Here

Examples of org.geoserver.config.LoggingInfo

        Document dom = dom( in( out ) );
        assertEquals( "global", dom.getDocumentElement().getNodeName() );
    }
   
    public void testLogging() throws Exception {
        LoggingInfo logging = factory.createLogging();
       
        logging.setLevel( "CRAZY_LOGGING" );
        logging.setLocation( "some/place/geoserver.log" );
        logging.setStdOutLogging( true );
       
        ByteArrayOutputStream out = out();
        persister.save( logging, out );
       
        LoggingInfo logging2 = persister.load(in(out),LoggingInfo.class);
        assertEquals( logging, logging2 );
       
        Document dom = dom( in( out ) );
        assertEquals( "logging", dom.getDocumentElement().getNodeName() );
       
View Full Code Here

Examples of org.geoserver.config.LoggingInfo

                File f= loader.find( "logging.xml" );
                if ( f != null ) {
                    XStreamPersister xp = new XStreamPersisterFactory().createXMLPersister();
                    BufferedInputStream in = new BufferedInputStream( new FileInputStream( f ) );
                    try {
                        LoggingInfo loginfo = xp.load(in,LoggingInfo.class);
                        final String location = getLogFileLocation(loginfo.getLocation());
                        LoggingUtils.initLogging(loader, loginfo.getLevel(), !loginfo.isStdOutLogging(),
                            location);
                    }
                    finally {
                        in.close();
                    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.