Package org.geoserver.config

Examples of org.geoserver.config.LoggingInfo


    }

    @SuppressWarnings("deprecation")
    private void reinitializeLogging() {
        try {
            LoggingInfo realLogInfo = this.getLogging();
            if (realLogInfo == null) {
                return;
            }
            LoggingInfo startLogInfo = LoggingStartupContextListener.getLogging(resourceLoader);
           
            // Doing this reflectively so that if LoggingInfo gets new properties, this should still
            // work. KS
           
            ClassProperties properties = OwsUtils.getClassProperties(LoggingInfo.class);
View Full Code Here


        db.save(global);
    }

    @Override
    public LoggingInfo getLogging() {
        LoggingInfo loggingInfo = db.getById(GLOBAL_LOGGING_ID, LoggingInfo.class);
        return loggingInfo;
    }
View Full Code Here

        if (null == getLogging()) {
            db.add(logging);
        } else {
            db.save(ModificationProxy.create(logging, LoggingInfo.class));
        }
        LoggingInfo saved = getLogging();
        Preconditions.checkNotNull(saved);
    }
View Full Code Here

   
    @Test
    public void testLogging() throws Exception {
        assertNull(dao.getLogging());
       
        LoggingInfo logging = dao.getGeoServer().getFactory().createLogging();
        dao.setLogging(logging);
       
        assertEquals(logging, dao.getLogging());
       
        logging = dao.getLogging();
        logging.setLevel("someLevel");
        dao.setLogging(logging);
       
        assertEquals(logging, dao.getLogging());
       
        logging = dao.getLogging();
        logging.setLocation("someLocation");
        dao.save(logging);
       
        assertEquals(logging, dao.getLogging());
    }
View Full Code Here

        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

        if (info == null) {
            throw new NullArgumentException("Incoming object is null");
        }
        try {
            // LOCALIZE service
            final LoggingInfo localObject = geoServer.getLogging();
            // overwrite local object members with new incoming settings
            BeanUtils.copyProperties(localObject, info);

            // disable the message producer to avoid recursion
            producer.disable();
View Full Code Here

        GeoServerInfo global = geoServer.getFactory().createGlobal();
        geoServer.setGlobal(global);
        addSettings(null, geoServer);

        LoggingInfo logging = geoServer.getFactory().createLogging();
        geoServer.setLogging(logging);
    }
View Full Code Here

public class LogPageTest extends GeoServerWicketTestSupport {

    @Test
    public void testDefaultLocation() {
        GeoServer gs = getGeoServerApplication().getGeoServer();
        LoggingInfo logging = gs.getLogging();
        logging.setLocation("logs/geoserver.log");
        gs.save(logging);

        login();
        tester.startPage(LogPage.class);
        tester.assertRenderedPage(LogPage.class);
View Full Code Here

    }

    @Test
    public void testNullLocation() {
        GeoServer gs = getGeoServerApplication().getGeoServer();
        LoggingInfo logging = gs.getLogging();
        logging.setLocation(null);
        gs.save(logging);

        login();
        tester.startPage(LogPage.class);
        tester.assertRenderedPage(LogPage.class);
View Full Code Here

    //
    // logging
    //
    public void setLogging(LoggingInfo logging) {
        LoggingInfo existing = getLogging();
        set(existing, logging, LoggingInfo.class);
    }
View Full Code Here

TOP

Related Classes of org.geoserver.config.LoggingInfo

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.