Class LogPolicy
-
- All Implemented Interfaces:
@Serializable() public final class LogPolicy extends PredefinedPolicy
The log settings model
-
-
Field Summary
Fields Modifier and Type Field Description private final Boolean
enabled
private final Boolean
featureEnabled
private final Integer
maxFileSize
private final String
logLevel
private final Integer
entryExpiry
private final Integer
maxFileNumber
-
Constructor Summary
Constructors Constructor Description LogPolicy(Boolean enabled, Boolean featureEnabled, Integer maxFileSize, String logLevel, Integer entryExpiry, Integer maxFileNumber)
-
Method Summary
Modifier and Type Method Description final Boolean
getEnabled()
Log upload is enabled or not final Boolean
getFeatureEnabled()
Log feature is enabled or not final Integer
getMaxFileSize()
Max file size in MB final String
getLogLevel()
The log level final Integer
getEntryExpiry()
The uploaded log will be deleted after the days final Integer
getMaxFileNumber()
Max file count for logs String
toString()
String
toStringWithDefaultValues()
final static LogPolicy
createFromJsonString(String jsonString)
Create log settings model from a json string final static Unit
setRootLogLevel(LogPolicy log)
Sets the root log level final static Level
getLogLevel(LogPolicy log)
Gets the corresponding log Level from the level string final static String
getLogLevelString(Level level)
Maps the log Level to the required log level string -
Methods inherited from class com.sap.cloud.mobile.foundation.settings.policies.PredefinedPolicy
getKeyPath
-
Methods inherited from class com.sap.cloud.mobile.foundation.settings.policies.AbstractSettingsEntity
toJsonString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getEnabled
final Boolean getEnabled()
Log upload is enabled or not
-
getFeatureEnabled
final Boolean getFeatureEnabled()
Log feature is enabled or not
-
getMaxFileSize
final Integer getMaxFileSize()
Max file size in MB
-
getLogLevel
final String getLogLevel()
The log level
-
getEntryExpiry
final Integer getEntryExpiry()
The uploaded log will be deleted after the days
-
getMaxFileNumber
final Integer getMaxFileNumber()
Max file count for logs
-
toString
String toString()
-
toStringWithDefaultValues
String toStringWithDefaultValues()
-
createFromJsonString
final static LogPolicy createFromJsonString(String jsonString)
Create log settings model from a json string
-
setRootLogLevel
@Deprecated(message = "Deprecated since 4.0", replaceWith = @ReplaceWith(imports = {}, expression = "LoggingService.policy")) final static Unit setRootLogLevel(LogPolicy log)
Sets the root log level
-
getLogLevel
final static Level getLogLevel(LogPolicy log)
Gets the corresponding log Level from the level string
-
getLogLevelString
final static String getLogLevelString(Level level)
Maps the log Level to the required log level string
-
-
-
-