I tried the following command:
gcloud logging logs delete
but it is asking log name
ERROR: (gcloud.logging.logs.delete) argument LOG_NAME: Must be specified.
I want to get all the logs to be deleted which are default.
I tried the following command:
gcloud logging logs delete
but it is asking log name
ERROR: (gcloud.logging.logs.delete) argument LOG_NAME: Must be specified.
I want to get all the logs to be deleted which are default.
Your question would benefit from showing some attempt to solve this problem for yourself.
See gcloud logging logs delete
It requires a LOG_NAME
as provided by e.g. gcloud logging logs list
.
Since logs list
returns a simple list of logs if you wanted to delete existing (!) log entries for all logs in a specific project, you could:
Use the following at your own risk
it will irrecoverably delete every existing log entry in every log in the current project
PROJECT="[[YOUR-PROJECT]]"
LOGS=$(\
gcloud logging log list \
--project=${PROJECT}
for LOG in ${LOGS}
do
gcloud logging logs delete ${LOG} \
--project=${PROJECT} \
--quiet
done