@Test public void testGlobal() throws Exception { GeoServerInfo info = importer.getConfiguration().getGlobal(); assertNotNull(info); LoggingInfo logging = importer.getConfiguration().getLogging(); assertNotNull(logging); assertEquals("DEFAULT_LOGGING.properties", logging.getLevel()); assertTrue(logging.isStdOutLogging()); assertEquals("logs/geoserver.log", logging.getLocation()); assertFalse(info.isVerbose()); assertFalse(info.isVerboseExceptions()); assertEquals(8, info.getNumDecimals()); assertEquals("UTF-8", info.getCharset()); assertEquals(3, info.getUpdateSequence()); } }
@Override protected Object load() { return getGeoServer().getLogging(); } };
@Override protected LoggingInfo load() { return getGeoServer().getLogging(); } };
@Override public boolean synchronize(LoggingInfo info) throws Exception { 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(); // save the localized object geoServer.save(localObject); } catch (Exception e) { if (LOGGER.isLoggable(java.util.logging.Level.SEVERE)) LOGGER.severe(this.getClass() + " is unable to synchronize the incoming event: " + info); throw e; } finally { // enable message the producer producer.enable(); } return true; }
@Override public boolean synchronize(LoggingInfo info) throws Exception { 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(); // save the localized object geoServer.save(localObject); } catch (Exception e) { if (LOGGER.isLoggable(java.util.logging.Level.SEVERE)) LOGGER.severe(this.getClass() + " is unable to synchronize the incoming event: " + info); throw e; } finally { // enable message the producer producer.enable(); } return true; }
"handleSettingsPostModified", SettingsInfo.class); } else if (LoggingInfo.class.isAssignableFrom(clazz)) { subj = gs.getLogging(); notifyMethod = ConfigurationListener.class.getMethod(
/** Visit both GeoServers and register the differences. */ private void computeDifferences() { // check GeoServer global settings differences if (!checkEquals(geoServerA.getGlobal(), geoServerB.getGlobal())) { differences.add(new InfoDiff(geoServerA.getGlobal(), geoServerB.getGlobal())); } if (!checkEquals(geoServerA.getLogging(), geoServerB.getLogging())) { differences.add(new InfoDiff(geoServerA.getLogging(), geoServerB.getLogging())); } // check services differences computeServicesDifference(); // check settings differences computeSettingsDifference(); }
location= getGeoServerApplication().getGeoServer().getLogging().getLocation();
location = getGeoServerApplication().getGeoServer().getLogging().getLocation();
assertEquals(null, geoServer.getLogging().getLocation());
catalogTsklet.doWrite(geoserver.getLogging(), td.get(Paths.BASE), "logging.xml"); assertEquals(geoserver.getLogging(), gsLogging);