Skip to content

一个可以用模拟器和真机调试,浏览器查看日志的工具。不需要打开XCode即可查看log

License

Notifications You must be signed in to change notification settings

Cellphoness/HttpLogPreview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HttpLogPreview

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Usage

To Copy following files to your project to customize

  • Define.swift
  • LogPreviewManager.swift
  • Lock.kit

use

HttpServerLogger.shared().startServer()

to start your server by default 8080 port

#if DEBUG
import HttpLogPreview
#endif

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

        #if DEBUG
        HttpServerLogger.shared().startServer(8989)
        #endif
        
        return true
    }
}

More Usage

more usage for LogPreviewManager.swift can be seen in Example Project ViewController.swift

Installation

HttpLogPreview is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'HttpLogPreview', :configurations => ['Debug']

Author

Cellphoness, [email protected]

License

HttpLogPreview is available under the MIT license. See the LICENSE file for more info.

About

一个可以用模拟器和真机调试,浏览器查看日志的工具。不需要打开XCode即可查看log

Resources

License

Stars

Watchers

Forks

Packages

No packages published