To run the example project, clone the repo, and run pod install
from the Example directory first.
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 for LogPreviewManager.swift can be seen in Example Project ViewController.swift
HttpLogPreview is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'HttpLogPreview', :configurations => ['Debug']
Cellphoness, [email protected]
HttpLogPreview is available under the MIT license. See the LICENSE file for more info.