Community

Viewing Logs in IBM Cloud Tools for Swift

Share this post:

Disclaimer: IBM Cloud Tools for Swift (ICT) is no longer supported. Check out IBM Cloud App Service to take advantage of the same features of ICT in a more comprehensive experience for building Cloud Native applications in any programming language.

Version 1.2 of IBM Cloud Tools for Swift (ICT) was released on 8/29/2016! ICT for Swift provides Mac users with a simple interface for deploying, managing and monitoring end-to-end Swift applications. The application integrates with tools designed by IBM Swift Engineers to easily get started writing Swift on the Server.

In this release, we added the ability to view your server application’s logs within ICT. Log viewing includes logs you generate in your application and those created by the Bluemix hosting environment. By combining both of these sources, it will be easier to debug your application in the event of a crash or deployment failure and track the progress of your app’s deployments.

Viewing the Logs

To view an application’s logs, first click on the project that contains your application. You will see your app’s card with a button that says “Open Logs”. Click on that button to open the log window. If you have any recent logs in Bluemix, you will see them in the window. ICT will post subsequent logs at the bottom of the window.

You can have multiple logs for different cloud runtimes open at the same time, which can be very useful if your app consists of microservices with multiple cloud runtimes interacting on the server.

Filtering Logs

Log Channel

There are two main channels to which logs will output: OUT, comparable to stdout, and ERR, comparable to stderr. The segemented control on the top left of the log window can show one or both of these channels to help you easily see the information important to you at that time.

Selecting one of the segments will filter for only those logs in that channel. This especially makes it easier to track down specific errors.

Log Type

At the top of the log window, you’ll see a dropdown with log types that represent the different sources for generating logs.

You can see the different types here. To filter by type, select the dropdown and pick the source you’d like to investigate. This can be useful if you only want to see logs you placed in your application. For more information about log types, click the information button next to the drop down.

Searching

In the center of the top control panel of the log window, there is a search bar for specific words or tags you want to find in the logs.

The application searches on all fields in the logs. Therefore, if you need to find a log with a specific time, channel, source, or phrasing, you can quickly find it.

Saving Logs

You can also save the output in the log window to a text file to review later or share with your team. To export your logs, click on the gear icon in the upper right corner of the log window. Then select “Save Logs” or simply press CMD+S if the Log window is your active window.

After you select where you want to save the logs, it will be saved with the name <your app name>_logs.txt in same format as the log window.

Conclusion

We hope this new logging functionality enhances your development process. If you have not already done so, download the IBM Cloud Tools for Swift Mac App If you would like to submit any feedback to our team, please complete our survey. To learn more about the Swift@IBM program, visit our website.

Add Comment
One Comment

Leave a Reply

Your email address will not be published.Required fields are marked *


Brian L. White Eagle

I work on this app and so of course, I like it. I like how I can have multiple logs open at the same time. It is great for a microservice architecture.

Reply
More Mobile Stories

New London Regional Service for IBM Cloud Object Storage

IBM is pleased to announce the immediate availability of our new low cost, low latency Regional Service for IBM Cloud Object Storage, for the UK-London Region, now open for all customers to use worldwide. With this new regional resiliency service, customers now have the choice to store and access their data within the UK London region for in-country data sovereignty, business continuity and high availability with low cost and low latency.

Continue reading

Welcome to IBM Cloud for VMware Solutions 2.0

IBM Cloud for VMware Solutions 2.0: Enhanced Management Control and Performance for your Hybrid Cloud Environment Since the strategic partnership between VMware and IBM Cloud launched almost 2 years ago, enterprise clients around the world have realized the myriad benefits of integrating their on-premises data center environments with IBM Cloud. Businesses seeking security and control […]

Continue reading

Db2 on Cloud offsite disaster recovery node is now in closed beta

Today, Db2 on Cloud already has excellent availability characteristics, with a 99.99% SLA and the ability to scale your database without app downtime, unlike other competitors in the market.

Continue reading