Utility.assertNotNull("logging.LogOperationTypes", logging.getLogOperationTypes()); xmlw.writeCharacters(logging.getLogOperationTypes().contains(LoggingOperations.DELETE) ? Constants.TRUE : Constants.FALSE); xmlw.writeEndElement(); xmlw.writeCharacters(logging.getLogOperationTypes().contains(LoggingOperations.READ) ? Constants.TRUE : Constants.FALSE); xmlw.writeEndElement(); xmlw.writeCharacters(logging.getLogOperationTypes().contains(LoggingOperations.WRITE) ? Constants.TRUE : Constants.FALSE); xmlw.writeEndElement();
Utility.assertNotNull("logging.LogOperationTypes", logging.getLogOperationTypes()); Utility.serializeElement(xmlw, Constants.AnalyticsConstants.DELETE_ELEMENT, logging.getLogOperationTypes() .contains(LoggingOperations.DELETE) ? Constants.TRUE : Constants.FALSE); Utility.serializeElement(xmlw, Constants.AnalyticsConstants.READ_ELEMENT, logging.getLogOperationTypes() .contains(LoggingOperations.READ) ? Constants.TRUE : Constants.FALSE); Utility.serializeElement(xmlw, Constants.AnalyticsConstants.WRITE_ELEMENT, logging.getLogOperationTypes() .contains(LoggingOperations.WRITE) ? Constants.TRUE : Constants.FALSE);
@Override public LoggingConfiguration getConfiguration(final Path container) throws BackgroundException { try { final ServiceProperties properties = session.getClient().downloadServiceProperties(null, context); final LoggingConfiguration configuration = new LoggingConfiguration( !properties.getLogging().getLogOperationTypes().isEmpty(), "$logs" ); // When you have configured Storage Logging to log request data from your storage account, it saves the log data // to blobs in a container named $logs in your storage account. configuration.setContainers(Collections.singletonList( new Path("/$logs", EnumSet.of(Path.Type.volume, Path.Type.directory))) ); return configuration; } catch(StorageException e) { throw new AzureExceptionMappingService().map("Cannot read container configuration", e); } }
this.props.getLogging().getLogOperationTypes().add(LoggingOperations.DELETE); this.props.getLogging().getLogOperationTypes().add(LoggingOperations.READ); this.props.getLogging().getLogOperationTypes().add(LoggingOperations.WRITE);
this.props.getLogging().getLogOperationTypes().add(LoggingOperations.DELETE); this.props.getLogging().getLogOperationTypes().add(LoggingOperations.READ); this.props.getLogging().getLogOperationTypes().add(LoggingOperations.WRITE);
assertTrue(propsA.getLogging().getLogOperationTypes().equals(propsB.getLogging().getLogOperationTypes())); assertEquals(propsA.getLogging().getRetentionIntervalInDays(), propsB.getLogging() .getRetentionIntervalInDays());