Melihat log instance untuk Looker (Google Cloud core)
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Halaman ini menjelaskan cara menemukan dan menggunakan Cloud Logging untuk melihat dan mengajukan kueri log
untuk instance Looker (inti Google Cloud) Anda.
Looker (Google Cloud core) menggunakan Cloud Logging. Lihat dokumentasi logging cloud
untuk mengetahui informasi selengkapnya.
Peran yang diperlukan
Untuk memahami peran yang diperlukan untuk Cloud Logging, buka halaman Kontrol akses dengan IAM di dokumentasi Cloud Logging.
Melihat log
Untuk melihat log untuk entri log instance Looker (Google Cloud core), pilih salah satu opsi berikut:
console
Di konsol Google Cloud , buka Logging > Logs Explorer
Pilih project Looker (inti Google Cloud) yang ada di bagian atas halaman.
Di Builder kueri, tambahkan hal berikut:
Resource: Pilih Looker instance. Pada dialog, pilih ID instance Looker (Google Cloud core).
Nama log: Scroll ke bagian Looker dan pilih
file log yang sesuai untuk instance Anda. Contoh:
looker.googleapis.com%2FContentAccess
looker.googleapis.com%2FUserLogin
Tingkat keparahan: Pilih level log.
Rentang waktu: Pilih preset atau buat rentang kustom.
gcloud
Gunakan perintah gcloud logging
untuk melihat entri log.
PROJECT_ID: ID Google Cloud project tempat instance Looker (Google Cloud core) berada.
Anda juga dapat menyertakan flag berikut:
Flag limit
adalah parameter opsional yang menunjukkan jumlah entri maksimum yang akan
ditampilkan.
Memecahkan masalah
Masalah
Pemecahan masalah
File log tidak lengkap.
Periksa tingkat keparahan tempat logging Anda dikonfigurasi. Pesan log di bawah level yang dikonfigurasi akan dihapus.
Informasi operasi tidak ditemukan dalam log.
Anda ingin menemukan informasi selengkapnya tentang suatu operasi.
Misalnya, pengguna telah dihapus tetapi Anda tidak dapat mengetahui siapa yang melakukannya.
Log menunjukkan
operasi dimulai tetapi tidak memberikan informasi lebih lanjut. Anda harus
mengaktifkan
logging audit agar informasi identitas
pribadi (PII) yang mendetail seperti ini dapat dicatat ke dalam log.
File log sulit dibaca.
Anda lebih suka melihat log sebagai JSON atau teks. Anda dapat menggunakan
perintah gcloud logging read
bersama dengan perintah pasca-pemrosesan Linux untuk mendownload log.
Untuk mendownload log sebagai JSON, gunakan kode berikut:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-25 UTC."],[],[],null,["# View instance logs for Looker (Google Cloud core)\n\nThis page describes how to find and use Cloud Logging to view and query logs\nfor your Looker (Google Cloud core) instance.\n\nLooker (Google Cloud core) uses Cloud Logging. See the [cloud logging documentation](/logging/docs)\nfor complete information.\n\nRequired roles\n--------------\n\nTo understand the required roles for Cloud Logging, visit the [Access control with IAM](/logging/docs/access-control) page of the Cloud Logging documentation.\n\nView logs\n---------\n\nTo view logs for your Looker (Google Cloud core) instance log entries, select one of the following options: \n\n### console\n\n\n1. In the Google Cloud console, go to **Logging \\\u003e Logs Explorer**\n2. Select an existing Looker (Google Cloud core) project at the top of the page.\n3. In the Query builder, add the following:\n - Resource: Select **Looker instance**. In the dialog, select a Looker (Google Cloud core) instance ID.\n - Log names: Scroll to the Looker section and select appropriate log files for your instance. For example:\n - looker.googleapis.com%2FContentAccess\n - looker.googleapis.com%2FUserLogin\n - Severity: Select a log level.\n - Time range: Select a preset or create a custom range.\n\n\u003cbr /\u003e\n\n### gcloud\n\n\nUse the [`gcloud logging`](/sdk/gcloud/reference/logging/read)\ncommand to view log entries.\n\n\u003cbr /\u003e\n\n```bash\ngcloud logging read \"resource.type=looker.googleapis.com/Instance\" \\\n--project=PROJECT_ID \\\n--limit=10 \\\n--format=json\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of the Google Cloud project in which the Looker (Google Cloud core) instance resides.\n\nYou may also include the following flags:\n\n- The [`limit`](/sdk/gcloud/reference/logging/read#--limit) flag is an optional parameter that indicates the maximum number of entries to return.\n\nTroubleshoot\n------------\n\nWhat's next\n-----------\n\n- [Looker (Google Cloud core) audit logging](/looker/docs/looker-core-audit-logging)"]]