Python 2.7 telah mencapai akhir dukungan
dan akan
dihentikan penggunaannya
pada 31 Januari 2026. Setelah penghentian penggunaan, Anda tidak akan dapat men-deploy aplikasi Python 2.7, meskipun organisasi Anda sebelumnya menggunakan kebijakan organisasi untuk mengaktifkan kembali deployment runtime lama. Aplikasi Python 2.7 yang ada akan terus berjalan dan menerima traffic setelah
tanggal penghentiannya. Sebaiknya Anda
bermigrasi ke versi Python terbaru yang didukung.
Mendownload Log
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
App Engine menyimpan log pesan yang dikeluarkan aplikasi Anda menggunakan
modul
logging
dari library standar Python, serta pesan lain yang dicetak
ke aliran data error standar.
App Engine juga mencatat setiap permintaan di log. Setiap tingkat keparahan log
(4 untuk CRITICAL, 3 untuk ERROR, 2 untuk WARNING, 1 untuk INFO, 0 untuk DEBUG)
memiliki ukuran buffer tetap yang mengontrol jumlah informasi log yang dapat
Anda akses. Biasanya, Anda lebih banyak menggunakan fitur logging pada level log yang lebih rendah; oleh karena itu,
periode waktu lebih singkat untuk peristiwa log pada level ini.
Setiap permintaan yang dicatat ke dalam log akan diberi
ID permintaan,
yaitu ID unik secara global berdasarkan waktu mulai permintaan.
Untuk menjelajahi log aplikasi pada 90 hari terakhir, Anda juga dapat menggunakan halaman Log di konsol Google Cloud .
Meminta log
Alat appcfg
kini dimatikan.
Penggantinya, Google Cloud CLI, tidak mendukung kemampuan untuk
mendownload log; tetapi Anda dapat melihat log menggunakan
perintah gcloud app logs
.
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-09-04 UTC.
[[["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-09-04 UTC."],[[["\u003cp\u003eApp Engine logs messages from the Python \u003ccode\u003elogging\u003c/code\u003e module and standard error stream, as well as every request.\u003c/p\u003e\n"],["\u003cp\u003eLog severity levels range from 0 (DEBUG) to 4 (CRITICAL), each having a buffer size that impacts accessible log information.\u003c/p\u003e\n"],["\u003cp\u003eEach logged request has a unique request ID, based on its start time, which can be used for reference.\u003c/p\u003e\n"],["\u003cp\u003eLogs from the last 90 days can be viewed through the Logs page in the Google Cloud console.\u003c/p\u003e\n"],["\u003cp\u003eWhile the \u003ccode\u003eappcfg\u003c/code\u003e tool is shut down, logs can still be viewed using the \u003ccode\u003egcloud app logs\u003c/code\u003e commands within the Google Cloud CLI.\u003c/p\u003e\n"]]],[],null,["# Downloading Logs\n\nApp Engine maintains a log of messages that your application emits using the `logging` module from the Python standard library, as well as other messages printed to the standard error stream. App Engine also records each request in the log. Each log severity level (4 for CRITICAL, 3 for ERROR, 2 for WARNING, 1 for INFO, 0 for DEBUG) has a fixed buffer size that controls the amount of log information you can access. Normally, you use logging features more at lower log levels; thus, the time window is smaller for log events at these levels. Each request logged is assigned a [request ID](/appengine/docs/legacy/standard/python/refdocs/google.appengine.api.logservice.logservice#google.appengine.api.logservice.logservice.RequestLog.request_id), a globally unique identifier based on the request's start time.\n\nTo browse your app's logs of the last 90 days, you can also use the\n[Logs page](https://console.cloud.google.com/logs) in the Google Cloud console.\n\nRequesting the logs\n-------------------\n\nThe `appcfg` tool is now [shut down](/appengine/docs/legacy/standard/python/sdk-gcloud-migration).\nThe replacement, [Google Cloud CLI](/sdk/docs), does not support the ability to\ndownload logs; however, you can view your logs using the\n[`gcloud app logs` commands](/sdk/gcloud/reference/app/logs)."]]