LogSettings Class
- java.
lang. Object - com.
microsoft. azure. management. monitor. LogSettings
- com.
public class LogSettings
Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular log.
Method Summary
Modifier and Type | Method and Description |
---|---|
String |
category()
Get name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation. |
boolean |
enabled()
Get a value indicating whether this log is enabled. |
Retention |
retentionPolicy()
Get the retention policy for this log. |
Log |
withCategory(String category)
Set name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation. |
Log |
withEnabled(boolean enabled)
Set a value indicating whether this log is enabled. |
Log |
withRetentionPolicy(RetentionPolicy retentionPolicy)
Set the retention policy for this log. |
Method Details
category
public String category()
Get name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
Returns:
enabled
public boolean enabled()
Get a value indicating whether this log is enabled.
Returns:
retentionPolicy
public RetentionPolicy retentionPolicy()
Get the retention policy for this log.
Returns:
withCategory
public LogSettings withCategory(String category)
Set name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
Parameters:
Returns:
withEnabled
public LogSettings withEnabled(boolean enabled)
Set a value indicating whether this log is enabled.
Parameters:
Returns:
withRetentionPolicy
public LogSettings withRetentionPolicy(RetentionPolicy retentionPolicy)
Set the retention policy for this log.
Parameters:
Returns:
Applies to
Azure SDK for Java
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for