メニュー

Expand
Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Logs - Coming Soon

The Logs endpoint is coming soon!

The logs endpoint shows any debug logs produced by executed Functions. To have logs show up on this endpoint, add

console.log("This is a log message from my function")

to your Function code and invoke it. The log line will show up at the /Logs endpoint.

Getting Logs from Functions

For Functions created via the API, you can show live logs for debugging by loading the API overview page and clicking the Show Logs link. Note: The Show logs link will only be visible if you have a live build associated with your environment via a deployment.

Log properties

Names in PHP format
sid
sid<NO> Not PII

The unique string that we created to identify the Log resource.

accountSid
sid<AC> Not PII

The SID of the Account that created the Log resource.

serviceSid
sid<ZS> Not PII

The SID of the Service that the Log resource is associated with.

environmentSid
sid<ZE> Not PII

The SID of the environment in which the log occurred.

deploymentSid
sid<ZD> Not PII

The SID of the deployment that corresponds to the log.

functionSid
sid<ZH> Not PII

The SID of the function whose invocation produced the log.

requestSid
sid<RQ> Not PII

The SID of the request associated with the log.

level
enum:level Not PII

The log level. Can be: info, warn, or error.

message
文字列 Not PII

The log message.

dateCreated
date_time<iso8601> Not PII

The date and time in GMT when the Log resource was created specified in ISO 8601 format.

url
url Not PII

The absolute URL of the Log resource.

Fetch a Log resource

GET
https://serverless.twilio.com/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Logs/{Sid}
パラメーター
Names in None format
service_sid
必須
GET sid_like<ZS> Not PII

The SID of the Service to fetch the Log resource from.

environment_sid
必須
GET sid<ZE> Not PII

The SID of the environment with the Log resource to fetch.

sid
必須
GET sid<NO> Not PII

The SID of the Log resource to fetch.

        
        
        
        

        Read multiple Log resources

        GET
        https://serverless.twilio.com/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Logs
        パラメーター
        Names in None format
        service_sid
        必須
        GET sid_like<ZS> Not PII

        The SID of the Service to read the Log resource from.

        environment_sid
        必須
        GET sid<ZE> Not PII

        The SID of the environment with the Log resources to read.

        function_sid
        オプション
        GET sid<ZH> Not PII

        The SID of the function whose invocation produced the Log resources to read.

              
              
              
              
              Rate this page:

              ヘルプが必要ですか?

              誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。