This topic describes how to enable and disable the service log feature and how to modify service log configurations.
Prerequisites
- A project is created. For more information, see Create a project.
- The RAM user that you want to use to log on to the Log Service console is granted the required permissions. To grant permissions to a RAM user, you must use an Alibaba Cloud account. For more information, see Grant permissions to a RAM user.
Enable the service log feature
Notice
- The billing method for all Logstores is the same regardless of whether the Logstores contain detailed logs. For more information, see Billable items.
- You are not charged when you import, store, query, and analyze important logs and job operational logs. You are charged for data shipping and data transformation based on the pay-as-you-go billing method.
- Only the service logs that are generated after you enable the service log feature are recorded.
Modify service log configurations
Disable the service log feature
Grant permissions to a RAM user
Before you can use the service log feature as a RAM user, you must use your Alibaba
Cloud account to grant the required permissions to the RAM user. For more information
about how to grant permissions, see Create a RAM user and authorize the RAM user to access Log Service. The following code shows a sample policy that contains the required permissions:
{
"Version": "1",
"Statement": [
{
"Action": [
"log:CreateDashboard",
"log:UpdateDashboard"
],
"Resource": "acs:log:*:*:project/{The project in which logs are stored}/dashboard/*",
"Effect": "Allow"
},
{
"Action": [
"log:GetProject",
"log:CreateProject",
"log:ListProject"
],
"Resource": "acs:log:*:*:project/*",
"Effect": "Allow"
},
{
"Action": [
"log:List*",
"log:Create*",
"log:Get*",
"log:Update*"
],
"Resource": "acs:log:*:*:project/{The project in which logs are stored}/logstore/*",
"Effect": "Allow"
},
{
"Action": [
"log:*"
],
"Resource": "acs:log:*:*:project/{The project for which the service log feature is enabled}/logging",
"Effect": "Allow"
}
]
}