Send feedback
Use Cloud Logging with queues
Stay organized with collections
Save and categorize content based on your preferences.
You can use Cloud Logging with Cloud Tasks queues.
Turning on logging
Console
Visit the Cloud Tasks console page.
Cloud Tasks
Find the queue for which you want to turn on logging and click the name.
On the Queue Details page, select the Logs tab.
Click Enable logs and confirm.
gcloud Cloud Logging can be turned on using a flag with the create
command or
the update
command:
gcloud tasks queues create QUEUE_ID --log-sampling-ratio= LOG_SAMPLING_RATION
or
gcloud tasks queues update QUEUE_ID --log-sampling-ratio= LOG_SAMPLING_RATIO
Replace the following:
QUEUE_ID
: the ID of your queue
LOG_SAMPLING_RATIO
: the fraction of the
operations logged. Any value between 1.0
and 0.0
logs that fraction of
operations. To log all operations, set it to 1.0
. To log no operations,
set it to 0.0
(this is the default).
Turning off logging
Console
Visit the Cloud Tasks console page.
Cloud Tasks
Find the queue for which you want to turn off logging and click the name.
On the Queue Details page, select the Logs tab.
Click the three dot icon and Disable logs . Confirm.
gcloud Turn off logging by setting the flag to 0.0
.
gcloud tasks queues update QUEUE_ID --log-sampling-ratio= 0 .0
Replace QUEUE_ID
with the ID of your queue.
Logged operations
The following operations are logged:
Task Operations
Attempt Operations
AttemptDispatch
AttemptResponse
Viewing logs
To see the logs, go to the Logging > Logs Explorer page in the
Google Cloud console:
Go to the Logs Explorer page
For information on viewing logs in the Logs Explorer, see
Using the Logs Explorer .
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-26 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?
{"lastModified": "Last updated 2024-09-26 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-26 UTC."]]