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 Booleanenabledprivate final BooleanfeatureEnabledprivate final IntegermaxFileSizeprivate final StringlogLevelprivate final IntegerentryExpiryprivate final IntegermaxFileNumber
-
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 BooleangetEnabled()Log upload is enabled or not final BooleangetFeatureEnabled()Log feature is enabled or not final IntegergetMaxFileSize()Max file size in MB final StringgetLogLevel()The log level final IntegergetEntryExpiry()The uploaded log will be deleted after the days final IntegergetMaxFileNumber()Max file count for logs StringtoString()StringtoStringWithDefaultValues()final static LogPolicycreateFromJsonString(String jsonString)Create log settings model from a json string final static UnitsetRootLogLevel(LogPolicy log)Sets the root log level final static LevelgetLogLevel(LogPolicy log)Gets the corresponding log Level from the level string final static StringgetLogLevelString(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
-
-
-
-