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/