@Override
    public void setConfiguration(final Path container, final LoggingConfiguration configuration) throws BackgroundException {
        try {
            final ServiceProperties properties = session.getClient().downloadServiceProperties(null, context);
            final LoggingProperties l = new LoggingProperties();
            if(configuration.isEnabled()) {
                l.setLogOperationTypes(EnumSet.allOf(LoggingOperations.class));
            }
            else {
                l.setLogOperationTypes(EnumSet.noneOf(LoggingOperations.class));
            }
            properties.setLogging(l);
            session.getClient().uploadServiceProperties(properties, null, context);
        }
        catch(StorageException e) {
            throw new AzureExceptionMappingService().map("Failure to write attributes of {0}", e, container);
        }
    }
@Test
    public void testSetConfiguration() throws Exception {
        final Path container = new Path("/cyberduck", EnumSet.of(Path.Type.volume, Path.Type.directory));
        final AzureLoggingFeature feature = new AzureLoggingFeature(session, null);
        feature.setConfiguration(container, new LoggingConfiguration(false));
        assertFalse(feature.getConfiguration(container).isEnabled());
        feature.setConfiguration(container, new LoggingConfiguration(true));
        assertTrue(feature.getConfiguration(container).isEnabled());
    }