Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now

Menu

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 SID identifier of this Log.

accountSid
sid<AC> Not PII

The unique SID identifier of the Account that owns this Log.

serviceSid
sid<ZS> Not PII

The unique SID identifier of the Service for this Log.

environmentSid
sid<ZE> Not PII

The unique SID identifier of the Environment in which this Log occurred.

deploymentSid
sid<ZD> Not PII

The unique SID identifier of the Deployment corresponding to this Log.

functionSid
sid<ZH> Not PII

The unique SID identifier of the Function whose invocation produced this Log.

requestSid
sid<RQ> Not PII

level
enum:level Not PII

message
string Not PII

dateCreated
date_time<iso8601> Not PII

The date that this Log was created, given in ISO 8601 format.

url
url Not PII

The URL of this Log.

Fetch a Log resource

get
https://serverless.twilio.com/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Logs/{Sid}
Parameters
Names in None format
service_sid
Required
get sid_like<ZS> Not PII

The unique SID identifier of the Service for this Log.

environment_sid
Required
get sid<ZE> Not PII

The unique SID identifier of the Environment in which this Log occurred.

sid
Required
get sid<NO> Not PII

The unique SID identifier of this Log.

Example
        
        
        
        

        Read multiple Log resources

        get
        https://serverless.twilio.com/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Logs
        Parameters
        Names in None format
        service_sid
        Required
        get sid_like<ZS> Not PII

        The unique SID identifier of the Service for these Logs.

        environment_sid
        Required
        get sid<ZE> Not PII

        The unique SID identifier of the Environment in which these Logs occurred.

        function_sid
        Optional
        get sid<ZH> Not PII

        The unique SID identifier of the Function whose invocation produced this Log.

        Example
              
              
              
              
              Rate this page:

              Need some help?

              We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.