@Service @Contract public class LoggingConfigImpl extends Object implements LoggingConfig
| Modifier and Type | Field and Description |
|---|---|
static Map<String,String> |
DEFAULT_LOG_PROPERTIES |
| Constructor and Description |
|---|
LoggingConfigImpl(File defaultConfigDir,
File configDir) |
LoggingConfigImpl(ServerEnvironmentImpl env) |
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
checkForLoggingProperties(Map<String,String> loggingProperties) |
String |
createZipFile(String sourceDir)
Creates a ZIP file from a given directory.
|
String |
createZipFile(String sourceDir,
String zipFileName) |
Map<String,String> |
deleteLoggingProperties(Map<String,String> properties)
Deletes all properties from the provided list.
|
String |
getLoggingFileDetails() |
Map<String,String> |
getLoggingProperties()
Get all properties from the managed file.
|
Map<String,String> |
getLoggingProperties(boolean usePlaceholderReplacement)
Get all properties from the managed file.
|
String |
getLoggingProperty(String propertyName)
Gets a given property from the managed file.
|
void |
initialize(String target)
Initializes the configuration for a given target.
|
Map<String,String> |
setLoggingProperties(Map<String,String> properties)
Sets all properties within the managed file.
|
String |
setLoggingProperty(String propertyName,
String propertyValue)
Sets the given property within the managed file.
|
@Inject public LoggingConfigImpl(ServerEnvironmentImpl env)
public void initialize(String target) throws IOException
LoggingConfiginitialize in interface LoggingConfigtarget - the target to fetch the logs from.IOException - if an error occurred while reading from the managed file.public String setLoggingProperty(String propertyName, String propertyValue) throws IOException
LoggingConfigsetLoggingProperty in interface LoggingConfigpropertyName - the name of the property to set.propertyValue - the value of the property to set.IOException - if an error occurred while writing to the managed file.public Map<String,String> setLoggingProperties(Map<String,String> properties) throws IOException
LoggingConfigsetLoggingProperties in interface LoggingConfigIOException - if an error occurred while writing to the managed file.public String getLoggingProperty(String propertyName) throws IOException
LoggingConfiggetLoggingProperty in interface LoggingConfigpropertyName - the name of the property to get.IOException - if an error occurred while reading from the managed file.public Map<String,String> getLoggingProperties() throws IOException
LoggingConfiggetLoggingProperties in interface LoggingConfigIOException - if an error occurred while reading from the managed file.public Map<String,String> getLoggingProperties(boolean usePlaceholderReplacement) throws IOException
LoggingConfiggetLoggingProperties in interface LoggingConfigusePlaceholderReplacement - - true for placeholder replacement, false returns original property valueIOExceptionpublic Map<String,String> checkForLoggingProperties(Map<String,String> loggingProperties) throws IOException
IOExceptionpublic Map<String,String> deleteLoggingProperties(Map<String,String> properties) throws IOException
LoggingConfigdeleteLoggingProperties in interface LoggingConfigproperties - all properties to delete within the managed file.IOException - if an error occurred while writing to the managed file.public String createZipFile(String sourceDir) throws IOException
LoggingConfigcreateZipFile in interface LoggingConfigsourceDir - the directory to ZIP.IOException - if an error occurred while creating the ZIP.public String createZipFile(String sourceDir, String zipFileName) throws IOException
IOExceptionpublic String getLoggingFileDetails() throws IOException
getLoggingFileDetails in interface LoggingConfigIOException - if an error occurred while reading from the managed file.Copyright © 2019. All rights reserved.