The simple implementation of sending probe logs to the chinemo log system by iOS

Source: Internet
Author: User

The simple implementation of sending probe logs to the chinemo log system by iOS

 

By referring to Testin's SDK implementation method, we can roughly determine the implementation method behind them:

 

First, load the Testin SDK, then collect various data in the 7th percentile, and then send the data to the cloud through the socket.

 

Cloud we already have, is http://log.qa.huayu.nd: 8088

 

But how can we collect data from iOS? We need to write the SDK by ourselves. The SDK is generally packaged using the framework, but here it is simple. I will use a static library to implement it, what I implement here is libHyLog01.a

 

To write such a library, you need a Mac and the xcode development environment.

 

Create a static library

 

Create a class:

MyClass

 

Then, start writing the probe log sending code:

 

 

Then, start compiling.

 

Next, we will reference it in our actual project.

 

 

Run:

 

Then, we can see that our log system server has received the data:

Http://log.qa.huayu.nd: 8088/

 

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.