Tropo Log Tailing

Working with Tropo’s scripting API is a quick and easy way to get great call and SMS functionality into your applications. But while building with the scripting API is great, debugging your code can be very frustrating.

Currently, to get a peek into what’s happening on Tropo’s end, you need to download your logs from their application manager on Tropo.com. These log files can grow very large (over 100MB) and load very slowly in their in-app editor. It’s also highly difficult to parse through the logs to find information that is relavent to what you are doing at that moment.
Screen+Shot+2016-07-19+at+7.36.11+PM

Most apps today have great real-time logging, like Ruby on Rails which lets you dig into the details of your app and see it executed in real-time. To bring this kind of experience to Tropo development, I’ve created the tropo_tail gem.

Tropo Tail Gem

To install, from your terminal or command prompt, type:

gem install tropo_tail

Installing this gem will give you access to the

tropo_tail

command. Upon running it will ask you for your Tropo username and password. This is to login to Tropo’s FTP server. The gem will then feed the log file as it is generated on Tropo’s servers to your terminal in realtime!

Screen+Shot+2016-07-19+at+8.46.27+PM

You’ll notice that Tropo’s logs come with a lot of information, sometimes too much. To help with this during development you can use a flag:

tropo_tail --truncate

This will cut off a large portion of Tropo information such as the application ID and session ID, and let you see Tropo’s output and a timestamp.

Screen+Shot+2016-07-19+at+8.47.24+PM

In addition to helping debug issues with the scripting API, this will work for any Tropo applications including those using the webAPI to help get an inside track into what’s going on behind the scenes and help you develop higher quality apps in no time at all!